收集的网上用的ajax之chat.js文件

2019-06-02 23:22:39刘景俊

}
}



var ey=0,ex=0,lx=0,ly=0,canDrg=false,thiso=null;
var x, y,rw,rh;

function dargit(o,e) //主函数
{
    thiso = o;
    canDrg = true;
    if(!document.all)
    {
        lx = e.clientX; ly = e.clientY;
    }
    else
    {
        lx = event.x; ly = event.y;
    }
    if(document.all) thiso.setCapture();
    try{}
    catch(e){}     
    st(o);//置前或置后

}
document.onmousemove=function(e)
{
    if(!document.all){ x = e.clientX; y = e.clientY; }else{ x = event.x; y = event.y; }
        if(canDrg)
        {
            var ofsx = x - lx;
            thiso.style.left = parseInt(thiso.style.left) + ofsx;
            lx = x;
            var ofsy = y - ly;
            thiso.style.top = parseInt(thiso.style.top) + ofsy;
            ly = y;

            // 状态栏显示数据
            //window.status=thiso.style.left+"left:top"+thiso.style.top+" rh:rw"+rh+"+"+rw;
        }
}

document.onmouseup=function()
{
    canDrg=false;//拖拽变量设为false
    try{}
    catch(e){}
    if(document.all && thiso != null)
    {
        //ie下,将清捕获;
        thiso.releaseCapture();
        thiso = null;
    }
}


function st(o)
{

    var p = o.parentNode;
    if(p.lastChild != o)
    {