151
rated 0 times
[
156]
[
5]
/ answers: 1 / hits: 85605
/ 12 Years ago, tue, october 2, 2012, 12:00:00
I don't find how to get the value of a key pressed.
I currently have
$('#info_price').bind('keydown',function(evt){
alert(evt.keyCode);
but it return '49' when I press on 1 instead of returning '1'.
Edit: I'm aware that Ascii code of key '1'.
The final goal is to allow people to only write digit into the input. So i want to detect the non digit and not display them.
More From » jquery