<img id="ww" OnMouseDown="StartSelect(document.all.m_texSelect)" OnMouseUp="EndSelect(document.all.m_texSelect)" OnMouseMove="move(document.all.m_texLine)" src="LineImage.aspx" border="0" style="z-index:0;position:absolute;" />
function move(texLine)
{
m_texLine=texLine;//文本对象
clear1ine()

var x0=window.event.x-GetDefineX(ww)+document.body.scrollLeft;//取到鼠标点下的横坐标document.body.scrollLeft 得到横滚动条的左偏移

    var  y0=event.clientY-GetDefineY(ww)+document.body.scrollTop;//取到鼠标点下的纵坐标 event.clientX 得到鼠标在屏幕上的位置。
    
    //判断是否超出范围
    if(x0<XOrg||x0>XOrg+Width)return;
if(y0<YOrg||y0>YOrg+Height)return;

 GetLine(x0,y0);
 
 //得到最近点的线
 GetNearLine(x0,y0);

}
function StartSelect(obj)
{
ww.setCapture();
alert(Row);
obj.value=Row;
}
function StartSelect(obj)
{

alert(Row);
obj.value=Row;
ww.releaseCapture();
}

解决方案 »

  1.   

    已经解决,是我在img控件的move事件中画线又建了个新层,所以点击不到img控件了
      

  2.   

    <html>
    <head>
     <title>test timeControl</title>
    </head>
    <script language="JavaScript">
    function timeControl(name,forObj,fName) {
    }
    </script>
    <body>
    <img id="ww" OnMouseDown="javascript:div1.innerText+='mousedown ';" OnMouseUp="javascript:div1.innerText+='mouseup ';" OnMouseMove="javascript:div1.innerText+='mousemove ';" onclick="javascript:div1.innerText+='mouseclick ';" src="a.jpg" border="0" style="z-index:0;position:absolute;" />
    <div id="div1" width="100%" height="100%"></div>
    </body>
    </html>
    可以下起用啊, 应该是你的代码有问题
    把alert()去掉