console
function divone(){
console.log('divone事件');
stopPropagation();
}
function divchild(){
console.log('divchild事件');
stopPropagation();
}
function stopPropagation(e) {
e = e || window.event;
if(e.stopPropagation) {
e.stopPropagation();
} else {
e.cancelBubble = true;
}
}
<div class="divone" onclick="divone(this)">
<div class="divchild" onclick="divchild(this)">
<a href="javascript:">点击</a>
<a href="javascript:">点击</a>
<a href="javascript:">点击</a>
</div>
</div>
.divone{width:100px;height:100px;background:black;position: relative;cursor: pointer}
.divchild{position: absolute;margin:10px;width:50px;height:50px;background:white;cursor: pointer}