阻止事件冒泡和事件默认行为

it2025-12-21  7

//阻止事件冒泡

if(typeof ev.stopPropagation=='function') { //标准的 ev.stopPropagation(); } else { //非标准IE window.event.cancelBubble = true; }

//阻止事件默认行为

return false
最新回复(0)