JavaScript Tutorial - 9 - possible answer to Task 26
<html> <head> <title>Slide Show</title> <script> var n=1 function change() { n++ if (n==6) { n=1 } document.images["pic"].src="pic"+n+".jpg" } </script> </head> <body> <center> <p> <img src=pic1.jpg name=pic width=126 height=128> <p> <form> <input type=button value="change image" onClick=change()> </form> <center> </body> </html>
HOME Table of Contents