function moveline(){
var box_width=80;
var box_top=60;
var current_cursor_x=event.clientX;
var current_cursor_y=event.clientY;
var line_in=current_cursor_x-div_left;
var top_in=current_cursor_y-div_top;
if(line_in>=left_blank&&line_in<=(width-right_blank)){//控制边界
//线跟随
line1.style.left=line_in-left_blank;
//框跟随
var x_value_temp=cal_x(line_in);
var x_index=get_x_index(x_value_temp);
msg_box.innerHTML="<p><font size=2> "+find_x(x_index)+"</font><br><font size=2 color='blue'> "+find_y(x_index)+"</font>";
if(line_in<width-right_blank-box_width-10){
msg_box.style.left=line_in+5;
}else{
msg_box.style.left=line_in-box_width;
}
if(top_in>=top_blank&&top_in<=(height-bottom_blank)){
if(top_in<=height-bottom_blank-box_top-10){
msg_box.style.top=top_in;
}else{
msg_box.style.top=top_in-box_top;
}
}
}
}
当width超过2000(估计值)后,该函数无效.请大家帮忙分析一下是怎么回事
具体情况是:有一个页面,X轴滚动条很长,在显示屏幕范围内有正常使用该函数,超过屏幕一定范围后该函数就无效了
上面的想加成红色失败
很少发这样的帖子,经验问题,又无法修改,原代码是:
if(line_in>=left_blank&&line_in<=(width-right_blank)){//控制边界
DIV很长..有很长的滚动条
clientX Property Sets or retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
event.clientY + document.body.scrollTop;