Questions tagged as 'javascript'

1
answer

XML with Javascript

I've been looking at Google for a few days to read a simple XML file and display it on an HTML page using pure javascript, I do not want to use Jquery, just javascript. I would like the XML data to be displayed in a common HTML table with TR...
asked by 25.04.2016 / 18:02
1
answer

12 to 24 hour format in JavaScript

I have a digital clock in JavaScript that is printing time from 1/12. How to convert to 13/24. <script> function relogio() { var d = new Date() var t = d.toLocaleTimeString() document.getElementById('relogio').innerH...
asked by 23.03.2016 / 21:22
1
answer

How to pause execution for a while (similar to a "wait" or "sleep")?

This code is working and running under an existing account on this site , what I want to do is: Add a pause, a type of While , Wait , Sleep or ReadyState , after login and before going to the new tab. This line would re...
asked by 25.12.2015 / 05:22
1
answer

JavaScript canvas builder

I'm having a question when creating a button builder for Canvas in JS, I can already detect the click in the button area, but I would like to simplify the code with a constructor, to streamline my process content, but I have no idea how to do it...
asked by 04.12.2015 / 18:45
1
answer

Shows the wrong date

I have this script: <SCRIPT LANGUAGE="JAVASCRIPT"> <!-- var now = new Date(); var mName = now.getMonth() +1 ; var dName = now.getDay() +2; var dayNr = now.getDate() +1; var yearNr=now.getYear(); if(dName==1) {Day = "Domingo";} if(...
asked by 30.05.2018 / 12:39
3
answers

How to generate random numbers in javascript, differently

Hello, I need your help! I need to generate random javascript , so that they are only generated 5 out of 5 and within a limitation, for example 5-555. Example: 5, 355, 425, 125, 550 Multiple numbers of 5 (5,10,15,20,25,30,35,40 ...) Nu...
asked by 02.05.2018 / 03:59
3
answers

When I click on the text it does not change (js)

I'm learning JS and I can not figure out why not change the text of h1 when I click on it. <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8"> <title>Testes JavaScript</title> </h...
asked by 19.01.2018 / 01:01
3
answers

Problem with Jquery UI Slide Left

I'm developing a project and needed to know how to slide a div to the left. I'm currently using: $('#idDiv').toggle('slide', { direction: 'left', distance: 450 }); I wanted my div of 500px width to slide and leave 50...
asked by 26.02.2014 / 12:41
3
answers

How to make infinite scroll with pure javascript?

I'm trying to implement an infinite scroll on my site, like this one , but I'm having difficulty do the script that takes the mouse scroll event. I tried to use this script (below) I got on a website, but it's not exactly what I need. Anyone...
asked by 25.02.2014 / 15:49
1
answer

Doubt with JavaScript arrow function

In the code below, the showName() method will of course return undefined , as it will fetch a name property in the scope where the obj is inserted. My question is, in that case would I have to use a conventional function, the ar...
asked by 01.06.2017 / 22:23