##CONTINUE##
In the Microsoft model you must set the event’s cancelBubble property to true.
window.event.cancelBubble = true
In the W3C model you must call the event’s stopPropagation() method.
e.stopPropagation()
This stops all propagation of the event in the bubbling phase. Stopping event propagation in the capturing phase is impossible. One wonders why.
For a complete cross-browser experience do
function doSomething(e)
{
if (!e) var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
}
噗 氣泡事件這翻譯詞實在是很有趣
回覆刪除我比較喜歡翻成連鎖事件
哈哈,我只是跟著用而已XD
回覆刪除