The for loop is used when you known in advance how many times the script should run.
//Example
<html>
<body>
<script language= "javascript"type="text/javascript">
var i=0
for(i=0; i<10;i++)
{
document,write("the number is"+i)
document.write("<br/>")
}
</script>
</body>
</html>
//Example
<html>
<body>
<script language= "javascript"type="text/javascript">
var i=0
for(i=0; i<10;i++)
{
document,write("the number is"+i)
document.write("<br/>")
}
</script>
</body>
</html>
No comments:
Post a Comment