document.body.style.cursor="move" ;

解决方案 »

  1.   

    <html>
    <body>
    <div id="div1" style="LEFT: 0px;  WIDTH: 356px; CURSOR: move; POSITION: absolute; TOP: 0px; HEIGHT: 284px; BACKGROUND-COLOR: silver;BACKGROUND-IMAGE: url(http://zi.csdn.net/dc468_60.gif)"
    language="javascript" onmousedown="down()" onmousemove="move()" onmouseup="up()"></div>
    <script>
    var isdown = false
    var beginx,beginy
    function down() 
    {
    isdown = true;
    }function move() 
    {
    if (isdown)
    {
    var endx = event.clientX;
    var endy = event.clientY;
    div1.style.left = parseInt( div1.style.left ) + endx-beginx;
    div1.style.top = parseInt( div1.style.top ) + endy-beginy;
    }
    beginx = event.clientX;
    beginy = event.clientY;}function up() 
    {
    isdown = false;
    }
    document.body.onmousemove = move
    document.body.onmouseup = up
    </script>
    </body>
    </html>
      

  2.   

    楼上老兄没有解决我的问题,我的主要问题是:拖动前鼠标为move形状,拖动时鼠标形状变了,怎么让它不变。
      

  3.   

    在我这里不变的.
    你的鼠标是不是变成漏斗形?如果是的话,把图片预加载一下( var theImg = new Image( url ) )就可以了
      

  4.   

    function move() 
    {
    if (isdown)
    {
    divid.style.cursor="hand";
    endx = event.clientX;
    endy = event.clientY;
    div1.style.left = endx-beginx;
    div1.style.top = endy-beginy;
    }
    }
      

  5.   

    层的代码改为如下:
    <div id="div1" style="LEFT: 0px;  WIDTH: 356px; CURSOR: move; POSITION: absolute; TOP: 0px; HEIGHT: 284px;"
    language="javascript" onmousedown="down()" onmousemove="move()" onmouseup="up()"><div style="WIDTH: 100%; CURSOR: move; POSITION: absolute; HEIGHT: 100%; z-index:2;BACKGROUND-IMAGE: url(file:///E:\My Documents\My Pictures\样品.jpg)"></div></div>
      

  6.   

    xishanlang2001(西山狼2000) ,怎么预加载?liuxiaoyi666(MSMVP 小猪妹荣誉马甲之八卦兔子)的办法不行。cuixiping(无心) 的办法可以,就是在拖动的DIV里嵌一个DIV,不过我想知道为什么,能说一下吗?
      

  7.   

    我的问题是出现个WEINDOWS系统的禁止拖拽的光标是怎么回事情,