Dynamic Images
just as you can use user-initiated events to change the contents of
text boxes, you can also dynamically modify images
<img name="photo" src="happy.gif" alt="Happy Face" />
ncauses the image stored in the file happy.gif to appear in the page
you can change the image by reassigning its SRC attribute in a script.
nsimilar to the way that text boxes have their VALUE attribute reassigned
nabsolute name of an image: document.images.IMAGE_NAME.src
n
document.images.photo.src = "sad.gif";
nreplaces happy.gif with sad.gif
n
n
note: images do not need to be embedded in forms