JSFiddle - React, Tailwind, and code Playground
HTML
<div id="box"></div>
CSS
#box{
width: 100px;
height: 100px;
background-color: #e0e0e0;
}
JavaScript
var box = document.getElementById('box');
box.addEventListener('click',function(ev){
alert('----冒泡阶段----');
},false);
box.addEventListener('click',function(ev){
alert('----捕获阶段----');
},true);