取消冒泡机制的兼容写法
function stopBubble(e){ if (e.stopPropagation) { e.stopPropagation(); }else { e.cancelBubble = true; } }
e.stopPropagation();//w3c标准下
e.cancelBubble = true;//IE9
function stopBubble(e){ if (e.stopPropagation) { e.stopPropagation(); }else { e.cancelBubble = true; } }
e.stopPropagation();//w3c标准下
e.cancelBubble = true;//IE9