Event handler not working in Internet Explorer
问题 I am creating a website using JavaScript. The purpose of the JS part is to attach my own keyboard handler to certain text fields. I managed to narrow down the problem to the code as simple as this fiddle: http://jsfiddle.net/k9s3n/1/ In Firefox, Opera and Chrome, typing a character in any of the three fields results in displaying an alert box with the key code. In Internet Explorer (IE8 in my case, that's the lowest version I usually support), however, only input3 works properly - that is, it