Javascript examples for DOM HTML Element:Input Text
Redirect all keyboard input to a textbox dynamically
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/* w w w . jav a 2 s . c om*/ function inputFocus(){ document.getElementById("inputField").focus(); } window.onkeydown = inputFocus; } </script> </head> <body> <input type="text" id="inputField"> </body> </html>