0
I’m not getting the entered value in an input field with jQuery:
HTML:
<input type="text" id="vendaMediaMensal" name="vendaMediaMensal">
jQuery:
var vendaMediaMensal = $("#vendaMediaMensal").val();
$("#vendaMediaMensal").focusout( function(){
alert(vendaMediaMensal);
});
It’s true, I’d forgotten that detail. And the value I enter in the field, I will have to convert to currency if I want to calculate with other values or no need?
– GustavoSevero
Well, there is no currency as a type in Javascript. In your case you will probably use a
parseFloat(valor)
.– bfavaretto