<html>
<head>
<title>鼠标变换图片实例</title>
</head>
<script language="javascript">
function ChangeImage(SiteName)
{
switch(SiteName)
{
//鼠标放上去时切换图片为新浪LOGO
case "sina":
this.LogoImage.src="http://i1.
break;
//鼠标离开时切换图片为网易LOGO
case "netease":
this.LogoImage.src="http://img1.
break;
}
//切换图片语法this.[img的name].src="图片URL路径";
}
</script>
<body>
<!--onMoseOver为鼠标放上去时触发的javascript函数代码-->
<!--onMouseOut为鼠标离开时的触发的javascript函数代码-->
<a href="#" onMouseOver="ChangeImage('sina');" onMouseOut="ChangImage('netease');" ><img name="LogoImage" border="0" src="http://img1. width="111" height="36" ></a>
</body>
</html>