修改了disp和mouseMove函数function qswh(){
if(ie4){
with(document.body){
if(x>offsetWidth+scrollLeft-20-overDiv.offsetWidth)x=offsetWidth+scrollLeft-20-overDiv.offsetWidth;
if(y>offsetHeight+scrollTop-50-overDiv.offsetHeight)y-=20+overDiv.offsetHeight;
}
}
if (dir == 2) { // Center
moveTo(over,x,y+10); 
}
if (dir == 1) { // Right
moveTo(over,x,y+10); 
}
if (dir == 0) { // Left
moveTo(over,x,y+10);
}
}
// Common calls
function disp() {
if ( (ns4) || (ie4) ) {
if (snow == 0)  {
qswh();
showObject(over);
snow = 1;
}
}
// Here you can make the text goto the statusbar.
}// Moves the layer
function mouseMove(e) {
if (ns4) {x=e.pageX; y=e.pageY;}
if (ie4) {x=event.x; y=event.y;}
if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
qswh();
}测试数据:
<div style=height:1000></div><span style=width:1500;></span>
<p align=right><A onmouseout=nd() onmouseover="dlc('<table border=0 cellpadding=0 cellspacing=0 width=300><tr><td width=100%><div align=left><table border cellpadding=0 cellspacing=0 width=300 bordercolordark=#333366 bordercolorlight=#3366cc><tr><td width=100%><div align=center><table border=0 cellpadding=3 cellspacing=0 width=100%><tr><td>asdfasdfasdf</td></tr><tr><td>asdfasdfasdf</td></tr><tr><td>asdfasdfasdf</td></tr><tr><td>asdfasdfasdf</td></tr><tr><td>asdfasdfasdf</td></tr><tr><td>asdfasdfasdf</td></tr></table></div></td></tr></table></div></td></tr></table>','0','20')">asdfasdfasdf</a></p>
<div style=height:1000>ps.因为手头没有NS,没有调试.