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

Popular posts from this blog

javascript - Hide toolbar of pdf file opened inside iframe using firefox -

Ansible - ERROR! the field 'hosts' is required but was not set -

Copy range with conditional formatting -