<!DOCTYPE html"> <head> <title>无标题文档</title> <body> </head> <div style="background:#FC0; padding:30px 100px" id = 'outer' onclick="alert('外')" "> <div style="color:#FFF; background:#09F; padding:5px 20px" id = 'core' > 内</div> </div> </body> <script type = 'text/javascript'> var core = document.getElementById('core'); core.addEventListener("click", function(e) { alert('内'); e.stopPropagation(); }, false); </script> <html>