抱歉,发贴主题的代码自己调试过了
原来的代码是下面这段        var x,y;
        function mousedown(obj)
        {
            obj.onmousemove = mousemove;
            obj.onmouseup = mouseup;
            
            oEvent = window.event ? window.event : event;
            x = oEvent.clientX;
            y = oEvent.clientY;
        }
        function mousemove()
        {
            oEvent = window.event ? window.event : event;
            var _top = oEvent.clientY - y + parseInt(this.style.top) + "px";
var _left = oEvent.clientX - x + parseInt(this.style.left) +"px";
            this.style.top = _top;
            this.style.left = _left;
            x =  oEvent.clientX;
            y =  oEvent.clientY
        }
        function mouseup()
        {
            this.onmousemove = null;
            this.onmouseup = null;
        }

解决方案 »

  1.   

    function mousedown(obj)
            {
                this.obj=obj;
                obj.onmousemove = mousemove;
                obj.onmouseup = mouseup;
                
                oEvent = window.event ? window.event : obj;
                x = oEvent.clientX;
                y = oEvent.clientY;
            }
            function mousemove()
            {
                oEvent = window.event ? window.event : this.obj;
                var _top = oEvent.clientY - y + parseInt(this.style.top) + "px";
                var _left = oEvent.clientX - x + parseInt(this.style.left) +"px";
                this.style.top = _top;
                this.style.left = _left;
                x =  oEvent.clientX;
                y =  oEvent.clientY
            }
            function mouseup()
            {
                this.onmousemove = null;
                this.onmouseup = null;
            }试试吧
      

  2.   

    不行啊,IE 没什么问题,ff 还是纹丝不动~
      

  3.   

    告诉你思路修改吧
    oEvent = window.event ? window.event : this.obj;
    红色部分,FF下读不到了
      

  4.   

    oEvent = window.event ? window.event : event;
    这是有问题的
    oEvent = window.event ? window.event : arguments[0];
    或是
    oEvent = window.event || arguments[0];或是
    function mousemove(e)
    {
       oEvent = e|| window.event;
    }
      

  5.   

    关键在这个event,火狐是不支持全局的event,所以用的话要这么写:var x,y;
            function mousedown(event,obj)
            {
                obj.onmousemove = mousemove;
                obj.onmouseup = mouseup;
                
                oEvent = window.event ? window.event : event;
                x = oEvent.clientX;
                y = oEvent.clientY;
            }
            function mousemove(event)
            {
                oEvent = window.event ? window.event : event;
                var _top = oEvent.clientY - y + parseInt(this.style.top) + "px";
                var _left = oEvent.clientX - x + parseInt(this.style.left) +"px";
                this.style.top = _top;
                this.style.left = _left;
                x =  oEvent.clientX;
                y =  oEvent.clientY
            }
            function mouseup()
            {
                this.onmousemove = null;
                this.onmouseup = null;
            }
    然后在触发函数的地方传入event,如:<input type="button" onClick="move(event)">