Super Market offers using Timeout function...

HTML Code:

9)

<html>
<head><h1><center><font color="red">**********SUPER MARKET**********</font></h1>
<title>timeout function</title>
<script>
var i=0;
var x;
function onTick()
{
setTimeOut("onTick();",2000);
document.all.spot.innerHTML=x[i];
i++;
if(i==6)
i=0;
}
function init()
{
x=new Array();
x[0]="Book-20%";
x[1]="Dress-30%";
x[2]="Mobile-50%";
x[3]="Snacks-40%";
x[4]="Bags-25%";
x[5]="Glass-20%";
setTimeOut("onTick();",1);
}
</script>
</head>
<body onLoad="init()" background="m.jpg">
<center><h2><u>ABC Departmental Store<br>Bhavani</u></h2>
<h1 id="spot"></h1>
<h3>Hurry up!!!</h3>
</center>
</body>
</html>

OUTPUT:




Comments

POPULAR POSTS

POPULAR POSTS