Form Images Rotate

[Total: 0    Average: 0/5]

This script will rotate an image that resides inside of a form

Body Code:

<!-- Note: This Javascript runs fine in IE5 and NN4.7 but NOT in the Mac-only IE4.5    -->
<SCRIPT TYPE="text/javascript">
<!--
var n=0;
var imgs = new Array("/js/pic1.gif","/js/pic2.gif","/js/pic3.gif");
function rotate(){
document.f.p.src=imgs[n];(n==(imgs.length-1))?n=0:n++;setTimeout("rotate()",2000)}
onload=rotate;
// -->
</SCRIPT>
<FORM NAME="f"><IMG NAME="p" SRC="/js/pic1.gif" WIDTH="50" HEIGHT="50" ALT="Ball"></FORM>
<br>
<hr>
<b>Wait 2 sec<b>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *