<div class="codetitle"> <span><a style="CURSOR: pointer" data="71500" class="copybut" id="copybut71500" onclick="doCopy('code71500')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code71500"> <br>function stopBubble(e) { <br>//如果傳入了對象,那麼就是非IE瀏覽器,才用W3C標準方法<br><br><br>if (e || e.stopPropagation) { <br>e.stopPropagation(); <br>} <br>else { <br>//才用IE的停止事件冒泡的方法<br>window.event.CancelBubble = true; <br>} <br>} <br> </div>