I'm having a strange behavior in jquery.
I'd like to get the value of a input field (type number). It's easier to show it with an example.
The function throws back an empty string when the value contains a comma.
$("#input[type='number']").on('change',function() {
alert($(this).val());
});
Why?
Thanks in advance
1,2, is not a number.type="number"isn't the solution. Try using a normal textbox, and formatting/rejecting as they type (or on thechangeevent)1,2would be considered a number in locales where the comma represents a decimal "point"