Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Image Changer</title>
<style type="text/css">
body {background-color:blue;}
</style>
<script type="JavaScript">
function ImgChange()
{ if (document.getElementByID("QWERT").src=="img1")
{document.(getElementByID("QWERT").src="img2"};
else if( document.getElementByID("QWERT").src=="img2")
{document.getElementByID("QWERT").src="img1"};
}
</script>
</head>
<body>
<form> <input type="button" value="Change Image" onclick="ImgChange()"
name="QwertButton"></form>
<img src="img1" title="QWERT" alt="Image 1" id="QWERT">
</body>
</html>
It's supposed totoggle an image when a button is pressed, but the image stays the same instead. And by the way, I tested the code on a 366 MHz iBook Clamshell on Classilla.