Filename-js4.html
<html>
<head>
<title> Practical 4 </title>
<script language="javascript">
function start_counter()
{
var i=0,count=0;
for(i=1;i<=10000;i++)
{
if(i%10==0)
{
document.write("<br>" + i + "<br>");
count++;
}
}
document.write("<br> Multiplication Of 10 are :- " + count);
}
function call_counter()
{
setTimeout("start_counter()",10000);
}
</script>
</head>
<body>
<form>
<!-- <input type="button" name="b1" value="Start" onClick="start_counter(this.form)"> -->
<input type="button" name="b1" value="Call" onClick="call_counter(this.form)">
</form>
</body>
</html>
Output
10 20 30 40 .
.
.
9970 9980 9990 10000 Multiplication of 10 are: - 1000
No comments:
Post a Comment