The focus goes to the field again, and the field value now is 12q.
But I want the field value turns 12. That is, without the last non-
numeric key value pressed. Am I clear enough?
But I want the field value turns 12. That is, without the last non-
numeric key value pressed. Am I clear enough?
var text = "12q";
var twelve = parseInt(text);
//twelve == 12
or you can user parseFloat()..d epends on your needs :D
Comment