user392406
user392406

Reputation: 1323

onKeyUp event is not working in IE but works in firefox

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

HTML:

JAVASCRIPT: function textTrack(e) { alert(e.keyCode); }

this works fine in firefox but not in IE.

Upvotes: 0

Views: 1983

Answers (1)

Dr.Molle
Dr.Molle

Reputation: 117334

In MSIE use the global event-object:

alert(window.event.keyCode);

Upvotes: 1

Related Questions