一个层上定义了onmouseout事件,但是鼠标还没有滑出该层,该层的onmouseout事件就发生了,何故?附源码
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
function showhide()
{
ii=window.setTimeout("hideme()",20)
}
function hideme()
{
Layer2.style.display="none"
//document.write(window.event.srcElement.tagName)
}
function showme()
{
window.clearTimeout(ii)
}
</script>
</head>
<body bgcolor="#FFFFFF">
<div id="Layer1" style="position:absolute; background-color:black;width:200px; height:115px; z-index:1; left: 15px; top: 182px" onmouseover="return showme()">
<font color=white> <p>ewayrtujhrthrweyh </p>
<p>yuhkgjh sf</p>
<p>fghkfsgh</p>
<p>gdj</p></font>
</div>
<div id="Layer2" onmouseout="return showhide();" style="position:absolute; background-color:black;width:200px; height:115px; z-index:1; left: 242px; top: 187px" >
<font color=red>2354764986-
3469-4658809</font>
</div>
</body>
</html>