如何让鼠标在表格中各单元移动时不激活主表格的onmouseout?

cueixu1 2003-10-09 02:52:47
RT
谢谢大家了
...全文
44 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
yllaji 2003-10-10
  • 打赏
  • 举报
回复
支持 楼上的~
xishanlang2001 2003-10-10
  • 打赏
  • 举报
回复
<table>
<tr>
<td onmouseout="return false;alert(1)">
sdf
</td>
<td onmouseout="return false;alert('sdfsdf')">
sdf
</td>
</tr>
</table>

这样可以吗?
好象不弹出对话框的.
descreekert 2003-10-10
  • 打赏
  • 举报
回复
fason(阿信) 你的方法好象不行啊
fason 2003-10-09
  • 打赏
  • 举报
回复
<table border=1 id=o onmouseout="c()" height=40>
<tr><td><a href="">这里移动不触发</a></td></tr>
</table>
<script>
function c(){
var e=event.srcElement
if(e.tagName!="TABLE")return
else alert(1)
}
</script>
fason 2003-10-09
  • 打赏
  • 举报
回复
<table border=1 id=o onmouseout="c()" height=40>
<tr><td><a href="">这里移动不触发</a></td></tr>
</table>
<script>
document.onmouseout=c
function c(){
var e=event.srcElement
if(o.contains(e))return
else alert(1)
}
</script>
kingdomzhf 2003-10-09
  • 打赏
  • 举报
回复
<table border=1 onmouseout="alert(1)">
<tr><td>a</td><td><table onmouseout="alert(2);event.cancelBubble=true"><tr><td>t2</td></tr></table></td></tr>
</table>

cancelBubble属性

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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