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

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

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -