鼠标经过图片在同一位置切换
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<style type="text/css">
<!--
#a1 {
height: 200px;
width: 200px;
background-color: #666666;
}
#a1 #a2 {
background-color: #FFCC00;
height: 200px;
width: 200px;
position: absolute;
display:none;
}
-->
</style>
<body>
<script>
function cao888(){
document.getElementById("a2").style.display="block"}
function caoon(){
document.getElementById("a2").style.display="none"}
</script>
<div id="a1" onMouseOut="caoon()" onMouseMove="cao888()">
<div id="a2"><font size=33>这不是图片呀</font></div>
<img src="http://pic1.blueidea.com/bbs/topic5.gif " height="200" width="200">
</div>
</body>
</html>

浙公网安备 33010602011771号