i have input with type number like this
<input type="number" class="number" min="0" max="999999" value="0" id="id">
when i use this code
$("#id").val();
if it's number like 1
it return the number
but if not a number like 1+1
it return empty string ""
so can i get the actual value with type number or i have to change to text to do so
i test it with chrome and firefox
i know that it will work with type text
but i'm looking to faster solution if there are non then i will change it to text and rewrite the code
here is my question now when i change the type to text using jquery it remove the value can i change it without remove the value ?
$('#id').attr('type','text')
what i want to do is make the type text get the value and return it back to number