js问题

扎德 2008-11-07 04:32:08
<!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>

<script language="javascript">
function out(object)
{
alert(1);
alert(event.toElement.id);
if(event.toElement.id != "zhu")
{
}
}
</script>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Test</title>
</head>

<body>
<div id="zhu" style="width:200px;height:200px;background:yellow" onmouseout="out(this);">
<font id="menu" style="background:green" color="green" onmouseover="alert(2);">menu</font>
<div id="test" style="background:black" onmouseout="alert(3);alert(event.toElement.id);">
<a id="a" href="www.baidu.com">aaaaaaaaaaaa</a>
<br />
<a id="b" href="www.google.com">bbbbbbbbbb</a>
</div>
</div>
</body>
</html>

代码如上 谁能比较透彻的解释下从黄色区域移动到绿色区域的时候 ALERT报的顺序是那样的
...全文
109 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
扎德 2008-11-07
  • 打赏
  • 举报
回复
周五没什么人了吗?
扎德 2008-11-07
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 wguorun 的回复:]
帮顶!自己试一下不就知道了吗
[/Quote]
我要知道的是为什么 汗
wguorun 2008-11-07
  • 打赏
  • 举报
回复
帮顶!自己试一下不就知道了吗

62,025

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧