合作联系微信: w6668263      合作联系电话:177-9238-7426     

javascript捕获事件event

 var e = e ? e : window.event;
 window.event ? window.event.cancelBubble = true : e.stopPropagation();
<button type="button" onclick="showInfo()">button</button>
<script type="text/javascript">
    function showInfo(){
         var e = e ? e : window.event;
         window.event ? window.event.cancelBubble = true : e.stopPropagation();
    }

</script>

 

QQ交流群:15129679

posted on 2017-07-27 11:22  草率的龙果果  阅读(196)  评论(0编辑  收藏  举报

导航