Questions tagged as 'javascript'

1
answer

how does the 'e' of javascript work? [duplicate]

In some of the codes I see, some people use the 'e' character in functions like: function NomeDaFuncao(e){ alert("teste"); } I would like to know how it works, what it does, and some examples where I can use it.     
asked by 30.08.2017 / 22:37
1
answer

Magic methods of python in javascript

Python objects have some magic methods like __init__ , __str__ , __eq__ , __ne__ , __gt__ , __lt__ , __ge__ and __le__ . How to simulate these methods in javascript, when I do console.log(obj)...
asked by 11.10.2017 / 00:08
2
answers

How to make google reCAPTCHA mandatory "required"

Well, I've implemented google reCAPTCHA in the forms of my website, working normal, but it is possible to send the forms without selecting the captcha, how do I make it a required field before submitting as a "required"?     
asked by 11.10.2017 / 13:41
1
answer

Convert Json to a Long type

I have a Json object coming from the localStorage and I need it to be converted to a Long type, in the case entidadeId idEntidade = localStorage.getItem("idEntidade"); var entidadeId = JSON.parse(idEntidade);     
asked by 13.10.2017 / 21:41
2
answers

I can not check the text boxes

I would like to know how I can calculate the BMI, but first check if the textfield has been filled. And how to format height mask to auto fill (X.XX)? <html> <meta charset="utf-8"> <head> <center> <title>testan...
asked by 16.10.2017 / 04:39
1
answer

Console shows javascript logging very fast and no time preview output

This is my code is a simple form: <!DOCTYPE html> <html> <head> <title>Formulário</title> <meta charset="utf-8" /> </head> <body> <form name="meu_form"> <h1>For...
asked by 26.10.2017 / 16:03
3
answers

How to concatenate an object with a variable to be dynamic?

I have an angular problem I have my object user = {name: 'Alexandre', email: '[email protected]'} I need a way to show on the console var attr = 'name'; var attr2 = 'email'; insira o código aqui console.log(use...
asked by 26.10.2017 / 22:21
2
answers

Event add div javascript

I have a code where there is a form and the user can choose the number of lines by clicking on the buttons that are in front of the input, there is a '+' button to add a new input and '-' to remove the current input. Follow the code: <d...
asked by 01.11.2017 / 13:29
2
answers

How to increase the id in the mongo?

You can do this, every time I create a new user for example he does the auto increment of _id. Starting from 1 and going up to the number of users     
asked by 09.11.2017 / 11:40
3
answers

Add hours with jQuery in real time

Hello, I have 3 input that receives hours and minutes of a timepicker : <input type="text" id="seg1" onBlur="calcular"> <input type="text" id="seg2" onBlur="calcular"> <input type="text" id="seg"> The first on...
asked by 29.10.2017 / 20:38