Javascript examples for DOM HTML Element:Form Event
HTML input name and get value from it
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from www .j a v a 2 s . c om*/ myFunc = function(){ console.log(document.getElementById("name").value); } } </script> </head> <body> Name <input type="text" id="name" onKeyUp="myFunc()"> </body> </html>