2个div 部分重叠 点击重叠出发事件
2个div 都有事件 点击重叠部分 只想触发上面那个DIV的事件。
<html>
<head>
<style type="text/css">
div.imgtask {
width:200px;
overflow:hidden;
white-space:nowrap;
background:#668CB3;
border:1px solid #FFF;
color:#FFF;
padding:1 0 1 3;
cursor:pointer;
position:absolute;
z-index:49000;
left:100px;
top:100px;
}div.imgtask3 {
width:40px;
overflow:hidden;
white-space:nowrap;
background:red;
border:1px solid #FFF;
color:#FFF;
padding:1 0 1 3;
cursor:pointer;
z-index:49001;
float:left;
}
</style></head>
<body>
<div class="imgtask" id="2007-08-08 10:00" onclick='aax2()'>
<div class="imgtask3" id="2007-08-08 11:30" onclick='aax()'>bb</div>
</div>
</body>
<script type="text/javascript">
function aax(){
alert("xxa");
}
function aax2(){
alert("xxa22222");
}
</script>
</html>
2个div 都有事件 点击重叠部分 只想触发上面那个DIV的事件。
<html>
<head>
<style type="text/css">
div.imgtask {
width:200px;
overflow:hidden;
white-space:nowrap;
background:#668CB3;
border:1px solid #FFF;
color:#FFF;
padding:1 0 1 3;
cursor:pointer;
position:absolute;
z-index:49000;
left:100px;
top:100px;
}div.imgtask3 {
width:40px;
overflow:hidden;
white-space:nowrap;
background:red;
border:1px solid #FFF;
color:#FFF;
padding:1 0 1 3;
cursor:pointer;
z-index:49001;
float:left;
}
</style></head>
<body>
<div class="imgtask" id="2007-08-08 10:00" onclick='aax2()'>
<div class="imgtask3" id="2007-08-08 11:30" onclick='aax()'>bb</div>
</div>
</body>
<script type="text/javascript">
function aax(){
alert("xxa");
}
function aax2(){
alert("xxa22222");
}
</script>
</html>
楼主【jackson_sj】截止到2008-06-30 10:37:31的历史汇总数据(不包括此帖):
发帖数:0 发帖分:0
结贴数:0 结贴分:0
未结数:0 未结分:0
结贴率:-------------------结分率:-------------------
如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html