假设你有这样的代码:
<html>
<head>
</head>
<body>
<div id="parentDiv" onclick="alert('parentDiv');">
<div id="childDiv" onclick="alert('childDiv');">
</div>
</div>
</body>
</html>
我不想在点击childDiv
时触发parentDiv
次点击事件,我该怎么做?
Updated
另外,这两个事件的执行顺序是什么?