补充: Firefox中一切正常. 就IE有问题.
解决方案 »
- JavaScript Tween算法及缓动效果
- javascript 跳转页面时如何传递多个参数?
- 能否让while循环按照规定的时间一次一次的循环啊!@!!!!!!
- javascript检测到页面输入有误,怎样在页面把有错的地方用不同颜色标示?
- 怎么用js在不关闭浏览器的情况下立即删除cookie
- 如何把这样数组形式的js文件内容以列表形式输出到页面?
- 求救 for ......in
- 请问这样的菜单哪里有?
- 为什么一次提交会出现两个页面?如何避免
- 请问如何判断一个用户输入的内容是否是“时间”类型的那?
- 日期控件 问题~ 急~ ----->小白问 小白问题了~~
- 请问事件驱动后面什么时候不用onload=javascript这样生命
1.为什么在mousemove的时候也要加上事件呢?这样pintar会不断被执行的
2.你确定Firefox里没有问题吗?因为window.event在FF里似乎是无效的
3.这个this到底到哪里好像有问题,建议加断点跟一下
linhas[x].onmousemove = pintar;
去掉试试
tabelaDrag = document.getElementById("tableIssues");
linhas = tabelaDrag.getElementsByTagName("TR");
celulas = tabelaDrag.getElementsByTagName("TD"); for (x=1; x<linhas.length;x++) {
linhas[x].onmouseover = pintar;
//linhas[x].onmousemove = pintar;
// Modified by Muiz on 2008-12-21 13:25 Add (Task - B1) - Start
linhas[x].onmouseout = pintar;
// Modified by Muiz on 2008-12-21 13:25 Add (Task - B1) - Start
} .....
}
}
.....
function pintar(e) {
if (!e) e=window.event
ev = e.type if ((this.tagName == 'TR')) {
linhaDrag = this.rowIndex // Modified by Muiz on 2008-12-21 13:25 Add (Task - B1) - Start
if (ev == "mouseout") {
this.style.backgroundColor = "#dedede";
} else if (ev == "mouseover") {
this.style.backgroundColor = "#66FF00";
}
// Modified by Muiz on 2008-12-21 13:25 Add (Task - B1) - End
if (ev == "mouseover" || ev == "mousemove") {
if (drag) {
if (linhaDrag != ultimaPosicao) {
ultimaPosicao = linhaDrag;
} var offsets = Position.cumulativeOffset(this);
$('droper').setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'}); Position.within(this, Event.pointerX(e), Event.pointerY(e)) var overlap = Position.overlap('vertical', this);
direcao = 'cima';
if (overlap <= 0.5) {
$('droper').setStyle({top: (offsets[1]+this.clientHeight) + 'px'});
direcao = 'baixo';
} $('droper').show();
}
}
}
}如果这里没有问题, 那也许是其他地方影响了?