- 注册时间
 - 2011-3-22
 - 最后登录
 - 2013-6-1
 - 在线时间
 - 51 小时
 - 阅读权限
 - 200
 - 积分
 - 4397
 - 帖子
 - 248
 - 精华
 - 0
 - UID
 - 9
  
 
 
 
    
 | 
不能的页面调用同一个JS,显示出来的位置效果啥不一样呢 
http://www.zg1929.com/baoming.html  变居中了 
http://www.zg1929.com/xly.htm  居中的为正确的 
 
JS代码如下: 
document.write("<DIV id=divStay style=\"position:absolute; right:0;\"> "); 
document.write("<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0> "); 
document.write("<TBODY> "); 
document.write("<TR> "); 
document.write("<TD vAlign=top width=\"7%\"> </TD></TR></TBODY></TABLE></DIV> "); 
document.write("<div id=\"divStayTopleft\" style=\"POSITION: absolute\"> "); 
document.write("<table cellspacing=\"0\" cellpadding=\"0\" width=\"109\" border=\"0\"> "); 
document.write("<tr> "); 
document.write("<td colspan=\"3\"> "); 
document.write("<a onClick=\"CloseQQ()\" href=\"javascript:;\" shape=\"circle\" coords=\"91,16,12\"> "); 
document.write("<img height=\"34\" src=\"http://www.zg1929.com/templets/default/tybm_img/qq_top.gif\" width=\"109\" usemap=\"#Map\" border=\"0\"></a></td> "); 
document.write("</tr> "); 
document.write("<tr> "); 
document.write("<td width=\"6\"><img height=\"130\" src=\"http://www.zg1929.com/templets/default/tybm_img/qq_life.gif\" width=\"6\"></td> "); 
document.write("<td width=\"96\" valign=\"top\" background=\"sto/qq_bg.gif\" bgcolor=\"#FFFFFF\"> "); 
document.write("<table cellspacing=\"0\" cellpadding=\"0\" width=\"90\" align=\"center\" border=\"0\"> "); 
document.write("<tr> "); 
document.write("<td height=\"30\"> "); 
document.write("<table cellspacing=\"0\" cellpadding=\"0\" width=\"90\" border=\"0\"> "); 
document.write("<tr> "); 
document.write("<td> "); 
document.write("<img height=\"13\" src=\"http://www.zg1929.com/templets/default/tybm_img/qq_ico1.gif\" width=\"16\"><span class=\"font_12\"> "); 
document.write("<span style=\"font-size: 9pt\">客户服务</span></span></td> "); 
document.write("</tr> "); 
document.write("</table> "); 
document.write("</td> "); 
document.write("</tr> "); 
document.write("<tr> "); 
document.write("<td> "); 
document.write("<table border=\"0\" width=\"100%\" cellpadding=\"2\" id=\"table47\"> "); 
document.write("<tr> "); 
document.write("<td height=\"23\" valign=\"bottom\"><script>document.write(\"<a target=blank href=tencent://message/?uin=200971929&Site=红色体验游客服&Menu=yes><img border=0 SRC=http://wpa.qq.com/pa?p=1:200971929:10 alt=[红色体验游客服]></a>\");</script></td> "); 
document.write("</tr> "); 
document.write("</table> "); 
document.write("</td> "); 
document.write("</tr>"); 
document.write("<tr> "); 
document.write("<td> "); 
document.write("<table border=\"0\" width=\"100%\" cellpadding=\"2\" id=\"table47\"> "); 
document.write("<tr> "); 
document.write("<td height=\"23\" valign=\"bottom\"><script>document.write(\"<a target=blank href=tencent://message/?uin=1824983759&Site=红色体验游客服&Menu=yes><img border=0 SRC=http://wpa.qq.com/pa?p=1:1824983759:10 alt=[红色体验游客服]></a>\");</script></td> "); 
document.write("</tr> "); 
document.write("</table> "); 
document.write("</td> "); 
document.write("</tr> "); 
document.write("<tr> "); 
document.write("<td></td> "); 
document.write("</tr> "); 
document.write("<tr> "); 
document.write("<td> "); 
document.write("<table border=\"0\" width=\"100%\" cellpadding=\"2\" id=\"table47\"> "); 
document.write("<tr> "); 
document.write("<td height=\"23\" valign=\"bottom\"><script>document.write(\"<a target=blank href=tencent://message/?uin=2268135697&Site=红色体验游客服&Menu=yes><img border=0 SRC=http://wpa.qq.com/pa?p=1:2268135697:10 alt=[红色体验游客服]></a>\");</script></td> "); 
document.write("</tr> "); 
document.write("</table> "); 
document.write("</td> "); 
document.write("</tr> "); 
document.write("<tr> "); 
document.write("<td></td> "); 
document.write("</tr> "); 
document.write("</table> "); 
document.write("</td> "); 
document.write("<td width=\"7\"><img height=\"130\" src=\"http://www.zg1929.com/templets/default/tybm_img/qq_right.gif\" width=\"7\"></td> "); 
document.write("</tr> "); 
document.write("<tr> "); 
document.write("<td colspan=\"3\"> "); 
document.write("<img height=\"30\" src=\"http://www.zg1929.com/templets/default/tybm_img/qq_bottom1.gif\" width=\"109\"></td> "); 
document.write("</tr> "); 
document.write("<tr> "); 
document.write("<td colspan=\"3\"> "); 
document.write("<img height=\"33\" src=\"http://www.zg1929.com/templets/default/tybm_img/qq_logo.gif\" width=\"109\"></td> "); 
document.write("</tr> "); 
document.write("</table> "); 
document.write("</div> "); 
 
function picsize(obj,MaxWidth){  
img=new Image();  
img.src=obj.src;  
if (img.width>MaxWidth)  
{  
return MaxWidth;  
}  
else  
{  
return img.width;  
}  
}  
function CloseQQ()  
{  
divStayTopleft.style.display="none";  
return true;  
}  
var online= new Array();  
 
function FloatTop()  
 
{  
 
        function offsetWidth() { 
 
                return document.documentElement.offsetWidth||document.body.offsetWidth;    
 
        } 
 
        function scrollTop() { 
 
                return document.documentElement.scrollTop||document.body.scrollTop;    
 
        } 
 
        function scrollLeft() { 
 
                return document.documentElement.scrollLeft||document.body.scrollLeft;    
 
        } 
 
        var startX1 =offsetWidth()-125 ,startY1 = 5;  
 
        var startX2 =0,startY2 = 95;  
 
        var ns = (navigator.appName.indexOf("Netscape") != -1);  
 
        var d = document;  
 
        function ml(id,startX,startY)  
 
        {  
 
                var el=document.getElementById(id); 
 
                el.sP = function(x,y){ /*this.style.left=x+"px";*/this.style.top=y+"px"; };  
 
                /*el.x = startX; */ 
 
                el.y = startY;  
 
                return el;  
 
        }  
 
        window.stayTopLeft=function()  
 
        {  
 
                var pY = ns ? pageYOffset : scrollTop(); 
 
                ftlObj.y += (pY + startY1 - ftlObj.y)/8;  
 
                ftlObj1.y += (pY + startY2 - ftlObj1.y)/8;  
 
                ftlObj.sP(scrollLeft()+offsetWidth()-125, ftlObj.y);  
 
                ftlObj1.sP(ftlObj1.x, ftlObj1.y);  
 
                setTimeout("stayTopLeft()", 30);  
 
        }  
 
        // ftlObj = ml("divStay",document.body.scrollLeft+document.body.offsetWidth-125,0);  
 
        // ftlObj1 = ml("divStayTopLeft",0,30);  
 
        ftlObj = ml("divStay",(scrollLeft()+offsetWidth())/2+379,0);  
 
        ftlObj1 = ml("divStayTopleft",(scrollLeft()+offsetWidth())/2+520,30);  
 
        stayTopLeft();  
 
}  
 
FloatTop(); 
 |   
 
  
 
 |