Javascript examples for DOM HTML Element:Input Text
Set value to textbox without button click
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from ww w.ja va 2 s . c o m*/ console.log(document.getElementById('fake').value); } </script> </head> <body> <input type="text" name="fake" id="fake" readonly value="example"> </body> </html>