JavaScript Tutorial - 9 - possible answer to Task 27
<html> <head> <title>Flip</title> <script> var n=1 function start1() { setTimeout("flip()",2000); } function flip() { n++ if (n==3) { n=1 } if (n==1) { document.images["bighat"].src="bighat.gif" } if (n==2) { document.images["bighat"].src="bighat_reverse.gif" } start1() } </script> </head> <body onLoad=start1()> <img src=bighat.gif name=bighat width=98 height=128> </body> </html>
HOME Table of Contents