Float Div for(var t=0;t');
脚本>
var g_myBodyInstance = document.body;
var g_myBodyInstanceString = "document.body";
if(document.compatMode != "BackCompat"){
// for loser.dtd
g_myBodyInstance = document.documentElement;
g_myBodyInstanceString = “document.documentElement”;
}
var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 &&
parseFloat(navigator.appVersion) >= 4) ? 1:0;
var isMinNS5 = (navigator.appName.indexOf("Netscape") >= 0 &&
parseFloat(navigator.appVersion) >= 5) ? 1:0;
var isMinIE4 = (document.all)? 1:0;
var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0)? 1:0;
var isMacIE = (isMinIE4 && navigator.userAgent.indexOf("Mac") >= 0)? 1:0;
var getFFVersion=navigator.userAgent.substring(
navigator.userAgent.indexOf("Firefox")).split("/")[1];
//在 FireFox 1.0 浏览器中添加到 iframe 的额外高度 (px)
var FFextraHeight=getFFVersion
function getLayer(name) {
if (isMinNS5)
return document.getElementById(name);
else if (isMinIE4)
return eval('document.all.' name);
else if (isMinNS4)
return findLayer(name, document);
返回 null;
}
函数 findLayer(name, doc) {
var i, layer;
for (i = 0; i layer = doc.layers[i];
if (layer.name == 名称)
返回图层;
if (layer.document.layers.length > 0) {
layer = findLayer(name, layer.document);
if (layer != null)
返回图层;
}
}
返回 null;
}
函数 moveLayerTo(layer, x, y) {
if (isMinIE4) {
layer.style.left = x;
layer.style.top = y;
}
else if (isMinNS5) {
layer.style.left = x 'px';
layer.style.top = y 'px';
}
else if (isMinNS4)
layer.moveTo(x, y);
}
函数 getPageLeft(layer) {
if (isMinIE4||isMinNS5)
return(layer.offsetLeft);
else if (isMinNS4)
return(layer.pageX);
返回(-1);
}
函数 getPageTop(layer) {
if (isMinIE4||isMinNS5)
return(layer.offsetTop);
else if (isMinNS4)
return(layer.pageY);
返回(-1);
}
函数 getPageScrollX() {
if (isMinIE4||isMinNS5)
return(g_myBodyInstance.scrollLeft);
else if (isMinNS4)
return(window.pageXOffset);
返回(-1);
}
函数 getPageScrollY() {
if (isMinIE4||isMinNS5)
return(g_myBodyInstance.scrollTop);
else if (isMinNS4)
return(window.pageYOffset);
返回(-1);
}
var g_p_zealNavigatorBar = null;
g_p_zealNavigatorBar = getLayer('zealNavigatorBar');
if(!isMinIE4){g_p_zealNavigatorBar.style.position ='固定';}
function reposzealNavigatorBar(){
if(isMinIE4){
尝试{
moveLayerTo(g_p_zealNavig) atorBar,
getPageLeft(g_p_zealNavigatorBar),
getPageScrollY());
}catch(e){}
}
}
window.onresize = reposzealNavigatorBar;
window.onscroll = reposzealNavigatorBar;
window.onload = reposzealNavigatorBar;
脚本>
身体>