36
rated 0 times
[
43]
[
7]
/ answers: 1 / hits: 21564
/ 12 Years ago, mon, july 23, 2012, 12:00:00
I am trying to execute some code of js when user press key enter or tab. When I alert keycode then showing correct, but when press key enter or tab then not showing any response.
I tried following code.
<input id=to onkeypress=checkemail(event);>
function checkemail(evt)
{
var keycode = evt.keyCode? evt.keyCode : evt.charCode;
//alert(keycode);
if(keycode=='13'|| keycode=='9')
{
//MyCode
}
}
This code is work properly in FireFox, but not showing any result in Google Chrome.
Please tell me any solution if have.
Thanks in advance.
More From » javascript