例を示しますin さまざまなイベント リスナーを追加する場合、バブリングはキャプチャとは異なります。
<script><br>function myP(e) {<br>alert("P 要素をクリックしました!");<br> window.event.cancelBubble = true : e .stopPropagation();<br>}<br>function myDiv() {<br>alert("DIV要素をクリックしました!");<br>}<br>function myPa() {<br>alert("P2要素をクリックしました!"); <br>}<br> function myDiva() {<br>alert("DIV2 要素をクリックしました!");<br>}<br></script>