<html>
<head>
<title>Replacing Images</title>
<script language="JavaScript">
var ix = 0
function changeImages(milliseconds) {
window.setInterval("changeImage()", milliseconds)
}
function changeImage() {
++ix;
ix %= 6;
var imageRef = document.images[0];
imageRef.src = "http://www.java2java.com/style/"+ix+".gif";
}
</script>
</head>
<body onload="changeImages(500)">
<p align="center"><img id="changeme" src="http://www.java2java.com/style/1.gif"></p>
</body>
</html>
|