following the example in this article, instead of moving the small window, you move the the image behindhttp://www.ebnet.com.cn/wangluo/texiao/tx39.htm

解决方案 »

  1.   

    你可以把图片作为背景来控制!,加上css属性,
    background-repeat:no-repeat,
    然后在鼠标移动的时候,通过background-position-x和background-position-y来控制图片!
      

  2.   

    try somethinge like this (you need to change the image src):
    <script language="javascript">
    var width = 200;
    var height = 200;function document.onmousemove()
    {
       var e = event.srcElement;
       if (e.tagName == "IMG" && e.id == "myimg")
       {
    var x = event.clientX - mytable.style.posLeft;
    var y = event.clientY - mytable.style.posTop; x = x*(myimg.width/width);
    y = y*(myimg.height/height); if (x  > myimg.width - width)
     x = myimg.width-width;
    else if (x < 0)
      x=0; if (y> myimg.height-height )
     y = myimg.height - height;
    else if (y<0)
     y=0; myimg.style.posLeft = -x;
    myimg.style.posTop = -y;
       }
    }function window.onload()
    {
      mytable.style.clip = "rect(0 " + width + " " + height + " 0)";
    }
    </script>
    <HTML>
    <BODY>
    <table STYLE="position:absolute;top:100;left:200;" id="mytable">
    <tr><td>
    <IMG SRC="image.bmp" id="myimg" style="position:relative;top:0;left:0;">
    </td></tr>
    </table>
      

  3.   

    楼上的狠,不过我想定制table的长宽怎么办啊,而且不要以绝对位置放啊。

    <table width=300 height=300>
    <tr><Td>
    <!--希望效果在下面的表里生效-->
    <table width=100% height=100%>
    <Tr><td><img src=....></td></tr>
    </table>
    <!--end-->
    </td></tr></table>