It did work in GoogleChrome but not in IE8. Thursday, June 24, AM. User posted What is not working? Are you debugging it? Saying it does not work does nothing for me. User posted It seems to be a more IE related issue. My problem is that I have a button on a page and despite making the keypress of 'enter' alert a message,.
Why is it that dependend on the div I click before pressing enter, the behaviour changes? I also tried :. Viewed times. Try keydown instead of keypress and keyCode instead of charCode: I've the following jquery function which avoid typing "1" in the input text:. Does that work on IE8? How to get username and password in a javascript object in ReactJS? Bundle javascript files in react with using next.
How to put a javascript function inside a React Class based component? Related Questions. Create table with Javascript Javascript - variable scope in event handler Odoo10 Javascript Widget action not working: ClientWidget is not a function Get initial form value with javascript Netbeans doesn't support javascript Webpack in production: Why React Native errors? Why should you avoid using "is" and "is not"? Event is undefined but that same property of window. You might try using window. I have no problem executing this on Internet Explorer 7 or earlier or on Mozilla Firefox 3.
It also executes properly when I use compatibility mode on Internet Explorer 8. Internet Explorer 8 is just giving me a hard time. So on my element I have this:. What I'm doing is overriding the Enter keystroke when a user enters a value into a textbox. I think window. Event property is undefined , but the same window. Event property note the lowercase e does matter. You can try using window. So, on my element, I have this:.
0コメント