<script>
function bb(obj,evt)
{
alert('kk');
var e=(evt)?evt:window.event; //判断浏览器的类型,在基于ie内核的浏览器中的使用cancelBubble
if (window.event) {
e.cancelBubble=true;
} else {
//e.preventDefault(); //在基于firefox内核的浏览器中支持做法stopPropagation
e.stopPropagation();
}
}
</script>
<table onclick="alert('table');">
<tr><td onclick="bb(this,event);">00000</td></tr>
</table>
function bb(obj,evt)
{
alert('kk');
var e=(evt)?evt:window.event; //判断浏览器的类型,在基于ie内核的浏览器中的使用cancelBubble
if (window.event) {
e.cancelBubble=true;
} else {
//e.preventDefault(); //在基于firefox内核的浏览器中支持做法stopPropagation
e.stopPropagation();
}
}
</script>
<table onclick="alert('table');">
<tr><td onclick="bb(this,event);">00000</td></tr>
</table>