JavaScript阻止冒泡事件

事件兼容

event = event ? event : window.event; 

js停止冒泡·

window.event? window.event.cancelBubble = true : event.stopPropagation();

js阻止默认行为

window.event? window.event.returnValue = false : event.preventDefault();
posted @ 2018-01-08 15:26  小小lomo  阅读(102)  评论(0编辑  收藏  举报