Questions tagged as 'javascript'

2
answers

Get the value of the javaScript table and put it in an array

I have a problem, I made a PivotTable in JavaScript and want to throw your data into an array, I tried using JSON but when I click the button to run the event it does nothing. I do not know if a plugin is missing, since I have never worked with...
asked by 16.11.2015 / 14:35
3
answers

How do I pick up the current time and decrease it 24 hours?

How do I get the current date in JavaScript, and create another date, only 24 hours before? To get the current time just do: var data = new Date(); to catch 24 hours before, how do you do?     
asked by 11.02.2017 / 22:30
2
answers

How to change the delay of the setInterval programmatically?

I tried this way but did not succeed. My intention is to make as an effect of the Bézier curve. var count = 0; var times = 100; var fn = function() { count++; if(count === 25) { console.log(count, times); times =...
asked by 01.12.2015 / 20:32
1
answer

How can I detect if the user of my site has my extension installed in Chrome / Moziilla

Hello, I need to detect if users who visit my site already have my installed extension, some functions of the site depend on this extension. If you have the extension installed you can access it normally and if you do not have a warning that...
asked by 06.02.2017 / 02:46
2
answers

Regular expression for password

I'm trying to do a strong password check in javascript. Initially I want to check if there are 02 numbers in the string under the following conditions: "12vvv": two consecutive numbers or more of anything returning true "1a1a": two separat...
asked by 22.02.2017 / 20:54
2
answers

How to use If Else correctly

I have the following checkboxes : <input type="checkbox" class="check" id="livros" value="livros"/> <input type="checkbox" class="check" id="folhas" value="folhas"/> <input type="checkbox" class="check" id="porta" value="porta...
asked by 21.02.2017 / 00:16
1
answer

When to use console.clear?

I was working on my website and installed a plugin, unfortunately the same did not load according to the page, giving several warnings on the console, for each product a warning, ie more than 100 warnings (warnings, not errors), I used console.c...
asked by 12.01.2017 / 14:36
1
answer

How can I make a new year script?

Well guys, I tried to do it but I could not. I want a javascript code that automatically activates only after midnight. See the code: var agora = new Date(); var anoNovo = new Date(2017, 0, 1, 0, 0, 0, 0); var anoNovoMax = new Date(2017, 0, 1,...
asked by 31.12.2016 / 14:48
1
answer

How to use regex beginning in the middle of the string?

I have a fairly large string and would like to check if a snippet of it matches a regex. The problem is that this snippet is in the middle of the string, in a very specific position. As I will have to do this several times (different strings, di...
asked by 11.01.2017 / 07:39
4
answers

How to check if an input has a String?

I need to check if the user typed a string in a field where they can only receive an Integer, I made the sequential code and when I click the button, it always returns the alert regardless of whether I write an integer or a string, what's wrong?...
asked by 02.03.2015 / 18:41