Questions tagged as 'javascript'

2
answers

How do I mark / unmark a link on a page by clicking on next / previous page?

I would like to tag and uncheck a "link " on a page ... Example var contar = 0; link = document.getElementsByTagName('a') // Rotina Do Botão Próximo document.getElementById('frente').onclick = function(){ contar++;...
asked by 02.01.2017 / 21:08
2
answers

Check if HTML is visually filled

I have this div: <div class="listagem-usuarios"> //Aqui eu deixo vazio e insiro algo quando necessário através do append </div> I would like to check if there is nothing inside this div. I did so: if($('.listagem-usuari...
asked by 26.12.2018 / 16:45
1
answer

ATM simulator

I am starting to put together a program that simulates an ATM with 3 banking options and an option for the user to terminate the process. But after the user-made operation, I tried to use the multiple decision command switch case w...
asked by 15.12.2018 / 20:25
2
answers

Simple calculation between string and integer

How to prevent this from happening? asd = "10" novo=asd/2; console.log(novo) // e ele me retorna 5 Being asd is a string and can not be debt and treated as integer.     
asked by 26.03.2014 / 16:53
1
answer

Round values up jQuery

I have the following jQuery: $(".quantidade_lotes").change(function() { var quantidade_linhas = $("#quantidade_linhas").val(); var quantidade_lotes = $(".quantidade_lotes").val(); var quantidade_dividida = (quantidade_linhas/quanti...
asked by 26.10.2016 / 18:11
2
answers

Animation in the display change in HTML

Hello my dear programmers friends of our Brazil! I need your help on the following question:  I have a button that when pressed changes the display from one div to one block. So: CSS #form-pergunta { display: none; } JavaScript f...
asked by 21.07.2016 / 18:55
1
answer

Declaration of variables with keys in Javascript

Recently I've seen a JavaScript code type, in some examples of Electron, which I believe to be part of ES6. They are variable declarations in the following format: const electron = require('electron'); // Module to control application life. co...
asked by 29.06.2016 / 19:22
2
answers

How does alert show when checking checkbox in a table?

I have a table: Theinformationshownissearchedinthebank,andonthesideofthecolumn(inthisexample)-Salary-willhaveacolumncalledLock/Unlock-whereIcanlockthatinformationinthebankfrom0to1)andsobeforethename-exampleAshtonCoxwillhaveagreeniconthatmean...
asked by 14.06.2016 / 17:21
3
answers

Optimize Ajax search that is slow

I'm experiencing slowness in this ajax search. <script type="text/javascript"> $('#nome').keyup(function () { var chars = (this.value); $.post('../Ajax/busca_nome', {val: chars}, function (busca) { $('#res...
asked by 20.05.2016 / 19:42
2
answers

Is it safe to use JavaScript's String.concat method in current browsers?

I was noticing that in JavaScript the String object has a method called concat . It serves to do the same thing as the + operator does. "Meu nome é " + nome Already with concat would look like this: "Meu nome é...
asked by 10.03.2016 / 16:19