I would like to display the elements in my array but it is NOT working. Here's my code:
Here's the ouput:
It should display:
Any comments or suggestions are greatly apprecitated.
thanks
Code:
<HTML> <HEAD> <TITLE>Test Input</TITLE> <script type="text/javascript"> function addtext() { var openURL=new Array("http://google.com","http://yahoo.com","http://www.msn.com","http://www.bing.com"); document.writeln('<table>'); for (i=0;i<=openURL.length-1;i++){ document.writeln('<tr><td>openURL[i]</td></tr>'); } document.writeln('</table>'); } </script> </HEAD> <body onload="addtext()"> </BODY> </HTML>
Code:
openURL[i] openURL[i] openURL[i] openURL[i]
Code:
http://google.com http://yahoo.com http://msn.com http://bing.com
thanks
Comment