Jan 17, 2010

How to use "Arrays in javascript" ?

Again a simple example given below to baptize about usage of an array
in javascript.
I have declared an array called "mygirls"
<html>
<body>
<script type="text/javascript">
var x;
var mysites = new Array();
mysites[0] = "http://saalram.com";
mysites[1] = "http://saalram.blogspot.com";
mysites[2] = "http://saalram.wordpress.com";

document.write("<b>This is an Array : </b>");
for (x=0;x<mysites.length;x++)
{
document.write("<center>"+mysites[x] + "<center />");
}
</script>
</body>
</html>


--
Publicize Yourself... Free!
http://saalram.com

No comments:

Post a Comment

Saalram.com

Saalram
Publicize yourself ...
http://saalram.com

Free !!!


Place your Ad here - Free!!!
just drop us a mail ... saalram.service@gmail.com

Free !!!