开发者

onKeyUp event is not working in IE but works in firefox

开发者 https://www.devze.com 2023-01-20 23:03 出处:网络
I m trying to get what user type in text box with javascript so i used this HTML: JAVASCRIPT: function textTrack(e)

I m trying to get what user type in text box with javascript so i used this

HTML:

JAVASCRIPT: function textTrack(e) { 开发者_StackOverflow中文版 alert(e.keyCode); }

this works fine in firefox but not in IE.


In MSIE use the global event-object:

alert(window.event.keyCode);
0

精彩评论

暂无评论...
验证码 换一张
取 消