Questions tagged as 'javascript'

3
answers

Extract only the numbers from a Javascript text box

How do I extract the numeric value of a text box in javascript, eg: valor imputado = 1a321q00 valor extraido e adicionado na variável = 132100 Thanks to anyone who helps me     
asked by 11.08.2016 / 22:25
2
answers

Remove character from a generated value

How to get a value generated, check how many characters it has and remove if necessary? Example: If the value is only 4 characters (eg 1844) it ignores, but if it goes from 4 characters a function removes the characters to only 4, type if it has...
asked by 18.07.2016 / 15:06
2
answers

In NodeJS, global variable in my app.js file is undefined in another file

I'm in a project using NodeJS, and its Express framework. In the main file app.js I call a function to read a file, and assign it to a global variable: global.google_sheet_credentials = readFileCredentials("spread_sheet.txt"); The func...
asked by 27.04.2016 / 13:47
2
answers

Editable table in PHP [closed]

I have a table with a list of companies. I want from a click on the table line to load a modal with the information of this company. Any suggestions on how to do it?     
asked by 23.05.2016 / 22:47
1
answer

How to monitor the change of an input type text field?

I need to monitor the change of the contents of a text field, the function I use is this: $(document).ready(function() { $("#nome").on("keyup change click focus", function() { $(".classenome").val($(this).val()); }); });...
asked by 10.06.2016 / 23:40
2
answers

Search for words on the webpage [closed]

I've been practicing web programming for a while. At the moment I want to know how I do a Chrome Ctrl + F style word search engine: when typing the characters it already points the respective words to me. I understand that I will have to use Jav...
asked by 19.10.2018 / 18:34
4
answers

Replace a specific character in an input type="text"

I need to make a function in JavaScript that when clicking the button make sure that a specific character was entered, in this case the ' (single quotation marks). If yes, replace the single quotation mark with a blank space. See the c...
asked by 17.12.2018 / 18:39
1
answer

Effect of increasing and decreasing border size

I found on a site an example of a just field increasing the border, follow the GIF below: I would like to know if I can in addition to increase, decrease the border size of an html element in the call of the same event? It would be...
asked by 25.10.2018 / 17:32
1
answer

Difference between // and / * ... * /

As far as I understood, using // to comment on a line and /*...*/ was the same, with the difference that the second spanned more than one line if necessary. There is SOME difference between doing // var a = 'teste' and /...
asked by 28.11.2018 / 15:31
1
answer

Events jQuery runs automatically

I have the following code: $(function(){ function teste(teste){ console.log(teste); } $('element').on('click', teste('teste')); }) When I run this code, the teste function is triggered without clicki...
asked by 10.03.2014 / 12:45