Advertisement
Java_Volume1 Internet/ Browsers/ HTML #99501

Simple MouseOver

I was tired of reading incomprehensible scripts that used arrays to store the image names or people trying to get fancy. This script does simply what it says, a simple mouseover. Moving the mouse over, off of or clicking on the image changes it.

AI

Yapay Zeka Özeti: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kaynak Kod
original-source
<script language="JavaScript1.2">
	function MseOvr(btnName) {
		// the btnName variable is received from the call in the <a href> tag.
		// the following line changes the image from the buttonnorm.gif to the buttonovr.gif.
		document.images[btnName].src = 'images/buttonovr.gif'
	}
	function MseDwn(btnName) {
		// the btnName variable is received from the call in the <a href> tag.
		// the following line changes the image from the buttonovr.gif to the buttondwn.gif.
		document.images[btnName].src='images/buttondwn.gif'
	}
	function MseOut(btnName) {
		// the btnName variable is received from the call in the <a href> tag.
		// the following line changes the image from the buttonovr.gif to the buttonnorm.gif.
		document.images[btnName].src='images/buttonnorm.gif'
	}
</script>
<body>
<!-- In the on mouseover attribute of this tag, I send the name of the image to the various functions. -->
<a href="#" onmouseover="MseOvr('button1')" onmousedown="MseDwn('button1')" onmouseout="MseOut('button1')">
<!-- To adjust this script to your page, change the name of the image "button1" in this case to something that 
reflects your image to make it easier to understand. You'll also need to make sure the name of your image is in the
MseOvr(image_name) function call. -->
<img src="images/buttonnorm.gif" class="clsImage1" name="button1" border="0"></a>
</body>
Orijinal Yorumlar (3)
Wayback Machine'den kurtarıldı