当鼠标移动指针后,我正在制作一个浮点数div。 但是在ie中,我试图从左侧移动到右侧,在该div上的2个位置,我发现mousemove事件无法触发。设置的css样式无法附加到元素中。为什么? codes here
我听说有人说使用stopPropagation可以解决这个问题,但它对我不起作用
function stopEventBubble(event) {
var e = event || window.event;
if (e && e.stopPropagation) {
e.cancelBubble = true;
e.stopPropagation();
console.log(1);
}
else {
e.cancelBubble = true;
console.log(0);
}
}
所以任何人都有任何想法?@ray