javascript - Events in Android OS/iOS /debian linux (on click of Enter key) -
how can detect enter key press event using javascript? want restrict enter key press event on text box in various platforms such android os, ios, debian linux.
the enter key 13. if have event listener can listen when key pressed so:
document.body.addeventlistener("keydown", function(event) { if(event.keycode == 13) alert("you hit enter key"); })
Comments
Post a Comment