Hi ,
I have this code
This code is change image at 3 seconds and stopped
How I can replay this timer every 3 seconds
HTML Code:
<script language="javascript">
function time_count()
{
var t = setTimeout("slide();",3000);
}
function slide()
{
var p8 = document.getElementById('img8');
var p9 = document.getElementById('img9');
if (p8.style.display == 'block' || p8.style.display == 'none'){
p8.style.display = 'block';
p9.style.display = 'none';
}
if (p9.style.display == 'block' || p9.style.display == 'none'){
p8.style.display = 'none';
p9.style.display = 'block';
}
}
</script>
<body onload="time_count();">
<img id="img8" src="8.jpg" width="300" height="299" style="display:block" />
<img id="img9" src="9.jpg" width="328" height="328" style="display:none" />
</body>
Thanks ...
|