div20*20||+rh;//右上角20*20的关闭区域
if(rh=20 && rw180 )document.title=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();
st(o);//置前或置后
}
document.onmousemove = function(e){
if(!document.all){ x = e.clientX; y = e.clientY; }else{ x = event.x; y = event.y; }
if(canDrg){
//if(rh=20 && rw180 ){//如果要设定拖动区域可以作判断
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;
//}else{canDrg=false;}
}
}
document.οnmοuseup=function(){
canDrg=false;//拖拽变量设为false
if(document.all && thiso != null){
//ie下,将清捕获;
thiso.releaseCapture();
thiso = null;
}
}
function set(obj){
obj=obj.parentNode.parentNode;
if(obj.getAttribute(rel));
//obj.style.zIndex=1;
}
function st(o){
var p = o.parentNode;
if(p.lastChild != o){
p.appendChild(o);
}
if(rh=20 && rw=180){
canDrg=false;
window.status=rw+|+rh;
if(p.firstChild == o) return;
p.insertBefore(o, p.firstChild);
}
}
/script
取消
评论