I have the following array:
var usuarios = [
{nome: "João", id: 1},
{nome: "Maria", id: 2},
{nome: "José", id: 3},
{nome: "Ana", id: 4},
];
I need to return the user index José.
I tried using indexOf as follows:
var...
I have a list with some links
https://www.exemplo.com/
https://www.exemplo.com/home/
https://www.exemplo.com/logo.png
https://intranet.exemplo.com/
https://admin.exemplo.com/login
https://www.exemplo.com/sobre/
https://www.exemplo.com/shell.ph...
It is the following: I use the Laravel Framework and, in it, I configure the application so that when a server error happens, it sends me an email, writes to a log file and / or sends me a message in the Telegram.
This kind of helps me anticip...
My question is:
I would like to change the color of a input according to the value in the calculation made.
For example let's assume that the value of input name="comparar" is 5 and the result of calculating input name="co...
The problem, in a general way, is that I can not pick up information I received on a controller and apply it to my html, when I try to print it instead the variable on the screen is empty when I give console.log on my scope, the information is th...
I'm trying to send JSON of view to a route, but I can not. Unfortunately I know little about JSON , ajax , GET and POST .
In the view, json:
var json = {
"numeroMesa": numeroMesa,
"itens": itens
}...
I have a query that is done with Ajax request via jQuery.
In the fields when I type a character as "ç" and send the request to the server, it is arriving with the character in another format.
Ex: I type ç in the name field and it arrives in Acti...
I have a input of type date, I would like to add to it 7 days and put that value in another input also of type date, I tried to do so:
<script>
$('#txtSolicitacao').on('blur', function(){
data = $('#txtSolicitacao').val...
I have a canvas on my page and would like to remove the border .... so I can not ... which property works with the border?
function desenhaBase(canvas, context, x1, y1, x2, y2){
context.fillStyle = "white";
c...
I want to make when when clicking on an image, your url is copied to the clipboard, I tried to use Clipboard but I was only able to copy the text.
var a = document.getElementById('id' + img).src.toString();
alert(a);
I want to do this but w...