前端基础Javascript事件监听默认、冒泡和捕获事件默认事件On this page默认事件取消默认事件w3c的方法是e.preventDefault(),IE则是使用e.returnValue = false;//假定有链接<a href="http://caibaojian.com/" id="testA" >caibaojian.com</a>var a = document.getElementById("testA");a.onclick =function(e){ if(e.preventDefault){ e.preventDefault(); }else{ window.event.returnValue == false; }}链接优秀文章:https://blog.csdn.net/sk_yi/article/details/107326653http://caibaojian.com/javascript-stoppropagation-preventdefault.html