I have the following code:
var e = Array (10,20,30,40, 50);
for (i = 0; i <= 50; i++) {
for (j = 0; j < e.length; j++) {
if (i == e[j]) document.write ("O numero escolhido é: " + i + "<br />");
else document....
I'm pretty new with javascript and when it comes to creating loopings I totally lose myself, the code below is to create the elements with each click and number the id and the text, but I'm having difficulties with that, I I managed to so...
I'm having a problem, I'm testing JSFIDDLE link when the user clicks on the photo - needs to change image, this is already in the test, but the user when clicking the image below, the top is back to what was ...
Thank you
What's the difference between these methods in JavaScript?
console.log(parseInt(3.3));
console.log(parseInt(3.7));
console.log(Math.floor(3.3));
console.log(Math.floor(3.7));
console.log(Math.trunc(3.3));
console.log(Math.trunc(3....
Good morning, I am putting together a system that when I click a button I add a <li> to the last row record, however every <li> has numeric data-id for differentiation, that is, I would need to know the last data-id...
I have to open a popup on a specific page.
My JS looks like this:
if($('.popup-banner').length > 0) {
$('.popup-banner .fechar, .popup-banner .link-fechar, .popup-overlay').click(function() {
$('.popup-overlay, .popup-banner'...
I'm getting values from a form in html, then I want to use a function to get these values and create an object, making them attributes of this object.
Then I want to save this object in the browser's localStorage, in Json format, so I can get...
Hello, I need some help.
I have a string="01/04/2012" and need to convert to date (dd-mm-yyyy) in pure javascript.
Here's what I did:
var vencimento = localStorage.getItem('dados2'); //Busca a variável que contém a string = 01/04/2012
va...
Is there any way to debug / debug a code in JSFiddle ? Usually in the chrome development tools there are several scripts, what is the correct way to put the breakpoint's to debug the code? Is there any way to debug via code?
I have a calendar where every day is:
<a class="dia" href="#">(Número do dia, ex: 1, 2, 3, etc)</a>
I did this below, but the problem is that I can only choose 1 class, I want it to work with either:
<a class="dia"...