Javascript examples for DOM HTML Element:Form Event
Setting background of input box to red
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w w w .ja v a 2 s . c o m*/ document.getElementsByName('Q_101')[0].style.backgroundColor='red'; } </script> </head> <body> <input type="text" name="Q_101" size="4" value="1" class="form_input_general"> </body> </html>