Javascript examples for DOM HTML Element:Input Text
Get value from HTML Text Field Input
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){// w w w . j a va 2 s. c om console.log(document.getElementById("usethisid").value); } </script> </head> <body> <p> <input type="text" name="name1" id="usethisid" maxlength="100" value="heres my default text"> </p> </body> </html>