Javascript examples for DOM HTML Element:Form Event
Call function in input button
<html> <head> <script> function go(){//from ww w. jav a2s . com var array = new Array(); array[0] = "Red"; array[1] = "Blue"; array[3] = "Green"; for (var i=0; i < array.length; i++){ document.write("<li>" + array[i] + "<br />"); } } </script> </head> <body> <input type="button" onclick="go()" value="Display JS Array"> </body> </html>