Javascript examples for DOM HTML Element:Input Text
Update form value
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/* ww w . j av a2 s . c om*/ var count = 0; doClick = function () { count++; document.frm.COUNTER.value = count; } }); </script> </head> <body> <form name="frm" action=""> <input name="COUNTER" value="0"> <a href="#" onclick="doClick();">Click Here</a> </form> </body> </html>