I would like to have to image on a page and a link of text that dosn't go any where, but just simply changes the picture to another picture. Can this be done? If so how?
Printable View
I would like to have to image on a page and a link of text that dosn't go any where, but just simply changes the picture to another picture. Can this be done? If so how?
Try something like this:
<html>
<head>
<title></title>
<script>
var pic1 = new Image(180,216);
var pic2 = new Image(180,216);
pic1.src = 'yourpic.jpg';
pic2.src = 'yourpic_next.jpg';
function changePic(obj){
obj.src = pic2.src;
}
</script>
</head>
<body>
<br>
<center>
<img SRC = "yourpic.jpg" NAME = "imgHolder">
<br>
<a HREF = "javascript:changePic(imgHolder);">Next Image</a>
</center>
</body>
</html>
Thank You So Much! That's Just What I Needed!