Client (dynamic) image replacement ...
You will need to use javascript to do this:
<img src="image1.jpg" id="myImage" />
<script type="text/javascript"> document.getElementById("myImage").src = "image2.jpg"; </script>
Introducing jQuery ...
If this is the type of answer you are looking for, I would also like to invite you to start checking and a javascript framework like jQuery , which makes this type of thing a lot easier to execute / manage. In jQuery, you can accomplish the same thing with the following code:
$("#myImage").attr("src", "image2.jpg");
Sampson
source share