参考一下吧
<script language=javascript>
function check(num)
{
var num=num;
var n=document.getElementsByTagName("div").length;
for(var i=1;i<=n;i++)
{
if(i==num)
{
document.getElementById("d"+num).style.display="block";
}
else
{
document.getElementById("d"+i).style.display="none";
}
}
}
</script>
<img src="1.gif" width="100" height="30" onMouseover="check(1);">
<img src="11.gif" width="100" height="30" onMouseover="check(2);">
<div id="d1" style="display:none" style="position:absolute; top:30px; left:100px;"><img src="1.gif" width="200" height="60"></div>
<div id="d2" style="display:none" style="position:absolute; top:30px; left:200px;"><img src="11.gif" width="200" height="60"></div>