js阻止浏览器默认行为和事件冒泡
2018-03-30 本文已影响21人
一只大花猫不爱吃鱼
js 阻止事件冒泡
window.event?window.event.cancelBubble =true: e.stopPropagation()
js 阻止默认行为
window.event?window.event.returnValue =false: e.preventDefault()
js 阻止事件冒泡
window.event?window.event.cancelBubble =true: e.stopPropagation()
js 阻止默认行为
window.event?window.event.returnValue =false: e.preventDefault()