SOURCE

console 命令行工具 X clear

                    
>
console
window.onload = function(){
var wrap = document.getElementById('wrap');
var outer = document.getElementById('outer');
var inner = document.getElementById('inner');

wrap.addEventListener('click',function(){
  alert('789');
},false);
outer.addEventListener('click',function(){
  alert('456');
},false);
inner.addEventListener('click',function(){
  alert('123');
},false);
}

     <div id="wrap">
        <div id="outer">
          <div id="inner"></div>
        </div>
    </div>
#wrap {
  width: 200px;
  height: 200px;
  background: orange;
}
#outer {
  position: relative;
  top: 50px;
  left: 50px;
  width: 100px;
  height: 100px;
  background: #eeddff;
}
/*inner中的top被修改*/
#inner {
  position: relative;
  top: 150px;
  left:25px;
  width: 50px;
  height: 50px;
  background: #44ddff;
}