SideShowBob1972
Programmer
I have some code which checks for the enter key being pressed and then executes some code.
function enterPressed(evn) {
if (window.event && window.event.keyCode == 13) {
Some code
} else if (evn && evn.keyCode == 13) {
Some Code
}
}
document.onkeypress = enterPressed;
It works on every browser except Safari on Mac.
Any suggestions?
function enterPressed(evn) {
if (window.event && window.event.keyCode == 13) {
Some code
} else if (evn && evn.keyCode == 13) {
Some Code
}
}
document.onkeypress = enterPressed;
It works on every browser except Safari on Mac.
Any suggestions?