事件执行的问题 呵呵,貌似就是我说的那个问题...http://blog.csdn.net/muxrwc/archive/2007/07/31/1718676.aspx可以先参考下这个帖子...因为over到子节点时触发了父点的out事件... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!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=gb2312" /><title>无标题文档</title></head><body><div id="b" style="width:200px;"><div id="c" style="height:50px;border:1px solid #000000"></div><div id="d" style="height:50px;border:1px solid #000000"></div></div><div id="a"></div><script>function Event(e){ var oEvent = (document.all) ? window.event : e; if (document.all) { oEvent.target = oEvent.srcElement; oEvent.stopPropagation = function() { this.cancelBubble = true; } //将toElement,fromElement转化为标准的relatedTarget if (oEvent.type == "mouseout") { oEvent.relatedTarget = oEvent.toElement; } else if (oEvent.type == "mouseover") { oEvent.relatedTarget = oEvent.fromElement; } } return oEvent;}//document.getElementById('c').onmouseout=function(e){Event(e).stopPropagation();}//document.getElementById('d').onmouseout=function(e){Event(e).stopPropagation();}document.getElementById('b').onmouseout=function(e){ document.getElementById('a').innerHTML+=Event(e).target.id+"_";}</script></body></html>终于明白原来b本身的mouseout根本没执行 jquery ui dialog 里调用ajax 之后dialog出错 jquery给textarea赋值怎么不好用呢? 变量作用域的问题,请教一下 怎样判断一个函数 是否执行完毕????? 当列表选中某一个值时,文本框自动隐藏 ajax中文乱码问题,要求用GB2312! highchart怎么读取sql数据库的值 在框架页面上想使某个页面在整个窗口显示 oo和event的问题,obj.func(event){}中如何引用对象本生? 关于动态显示网页的问题 如何下载文件时 用户是保存,还是取消下载。--用于积分管理(只有下载成功才能扣掉积分) 关于div赋值的执行顺序问题!请教啊
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body><div id="b" style="width:200px;">
<div id="c" style="height:50px;border:1px solid #000000">
</div>
<div id="d" style="height:50px;border:1px solid #000000">
</div>
</div>
<div id="a"></div><script>
function Event(e){
var oEvent = (document.all) ? window.event : e;
if (document.all) {
oEvent.target = oEvent.srcElement;
oEvent.stopPropagation = function() { this.cancelBubble = true; }
//将toElement,fromElement转化为标准的relatedTarget
if (oEvent.type == "mouseout") {
oEvent.relatedTarget = oEvent.toElement;
} else if (oEvent.type == "mouseover") {
oEvent.relatedTarget = oEvent.fromElement;
}
}
return oEvent;
}//document.getElementById('c').onmouseout=function(e){Event(e).stopPropagation();}
//document.getElementById('d').onmouseout=function(e){Event(e).stopPropagation();}
document.getElementById('b').onmouseout=function(e){ document.getElementById('a').innerHTML+=Event(e).target.id+"_";}</script>
</body>
</html>终于明白
原来b本身的mouseout根本没执行