//===================================================
//获取图层属性
//全局访问
function Chip(chipname){
var aname=navigator.appName;
this.named=chipname;
if (aname == "Netscape"){
this.w=parseInt(eval("document."+chipname+".width"));
this.h=parseInt(eval("document."+chipname+".height"));
this.t=parseInt(eval("document."+chipname+".top"));
this.l=parseInt(eval("document."+chipname+".left"));
this.ox=parseInt(eval("document."+chipname+".ADOx"));
this.oy=parseInt(eval("document."+chipname+".ADOy"));
this.x=parseInt(eval("document."+chipname+".ADLeft"));
this.y=parseInt(eval("document."+chipname+".ADTop"));
this.step=parseInt(eval("document."+chipname+".Lmove"));
this.ctime=parseInt(eval("document."+chipname+".autoclose"));
this.timer=parseInt(eval("document."+chipname+".autotimer"));
}
else{
this.w=parseInt(eval("document.all."+chipname+".style.width"));
this.h=parseInt(eval("document.all."+chipname+".style.height"));
this.t=parseInt(eval("document.all."+chipname+".style.top"));
this.l=parseInt(eval("document.all."+chipname+".style.left"));
this.ox=parseInt(eval("document.all."+chipname+".ADOx"));
this.oy=parseInt(eval("document.all."+chipname+".ADOy"));
this.x=parseInt(eval("document.all."+chipname+".ADLeft"));
this.y=parseInt(eval("document.all."+chipname+".ADTop"));
this.step=parseInt(eval("document.all."+chipname+".Lmove"));
this.ctime=parseInt(eval("document.all."+chipname+".autoclose"));
this.timer=parseInt(eval("document.all."+chipname+".autotimer"));
}
this.t=isNaN(this.t)?0:this.t;
this.l=isNaN(this.l)?0:this.l;
this.h=isNaN(this.h)?0:this.h;
this.w=isNaN(this.w)?0:this.w;
this.ox=isNaN(this.ox)?0:this.ox;
this.oy=isNaN(this.oy)?0:this.oy;
this.x=isNaN(this.x)?0:this.x;
this.y=isNaN(this.y)?0:this.y;
this.step=isNaN(this.step)?0:this.step;
this.ctime=isNaN(this.ctime)?0:this.ctime;
this.timer=isNaN(this.timer)?0:this.timer;
}
//==============================================
//设置图层位置
//全局访问
function LMan_setLocation(objstr,AddX,AddY){
var aname=navigator.appName;
if (aname == "Netscape"){
eval(objstr+".top ="+AddY);
eval(objstr+".left="+AddX);
}
else{
eval(objstr+".style.pixelLeft="+AddX);
eval(objstr+".style.pixelTop ="+AddY);
}
}
//获取图层属性
//全局访问
function Chip(chipname){
var aname=navigator.appName;
this.named=chipname;
if (aname == "Netscape"){
this.w=parseInt(eval("document."+chipname+".width"));
this.h=parseInt(eval("document."+chipname+".height"));
this.t=parseInt(eval("document."+chipname+".top"));
this.l=parseInt(eval("document."+chipname+".left"));
this.ox=parseInt(eval("document."+chipname+".ADOx"));
this.oy=parseInt(eval("document."+chipname+".ADOy"));
this.x=parseInt(eval("document."+chipname+".ADLeft"));
this.y=parseInt(eval("document."+chipname+".ADTop"));
this.step=parseInt(eval("document."+chipname+".Lmove"));
this.ctime=parseInt(eval("document."+chipname+".autoclose"));
this.timer=parseInt(eval("document."+chipname+".autotimer"));
}
else{
this.w=parseInt(eval("document.all."+chipname+".style.width"));
this.h=parseInt(eval("document.all."+chipname+".style.height"));
this.t=parseInt(eval("document.all."+chipname+".style.top"));
this.l=parseInt(eval("document.all."+chipname+".style.left"));
this.ox=parseInt(eval("document.all."+chipname+".ADOx"));
this.oy=parseInt(eval("document.all."+chipname+".ADOy"));
this.x=parseInt(eval("document.all."+chipname+".ADLeft"));
this.y=parseInt(eval("document.all."+chipname+".ADTop"));
this.step=parseInt(eval("document.all."+chipname+".Lmove"));
this.ctime=parseInt(eval("document.all."+chipname+".autoclose"));
this.timer=parseInt(eval("document.all."+chipname+".autotimer"));
}
this.t=isNaN(this.t)?0:this.t;
this.l=isNaN(this.l)?0:this.l;
this.h=isNaN(this.h)?0:this.h;
this.w=isNaN(this.w)?0:this.w;
this.ox=isNaN(this.ox)?0:this.ox;
this.oy=isNaN(this.oy)?0:this.oy;
this.x=isNaN(this.x)?0:this.x;
this.y=isNaN(this.y)?0:this.y;
this.step=isNaN(this.step)?0:this.step;
this.ctime=isNaN(this.ctime)?0:this.ctime;
this.timer=isNaN(this.timer)?0:this.timer;
}
//==============================================
//设置图层位置
//全局访问
function LMan_setLocation(objstr,AddX,AddY){
var aname=navigator.appName;
if (aname == "Netscape"){
eval(objstr+".top ="+AddY);
eval(objstr+".left="+AddX);
}
else{
eval(objstr+".style.pixelLeft="+AddX);
eval(objstr+".style.pixelTop ="+AddY);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货