怎样让层随着滚动条下移而下移,上升而上升? http://www.baron.com.cn/javascript里面能找到你要的东西 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 将GIF放到一个ID为"border"的层中:<div id="border" style="position:absolute; top:0; left:0; z-index:2;"><img src="http://go.6to23.com/qingang1983/001/2003081634035280.gif"></div>然后加入如下代码:<script Language="Javascript"><!--//以下是保持border层随窗口内容滚动而自动滚动function KB_keepItInIE(theName,theWantTop,theWantLeft){ theRealTop = parseInt(document.body.scrollTop); theTrueTop = theWantTop+theRealTop; document.all[theName].style.top = theTrueTop; theRealLeft = parseInt(document.body.scrollLeft); theTrueLeft = theWantLeft+theRealLeft; document.all[theName].style.left = theTrueLeft;}function KB_keepItInNN(theName,theWantX,theWantY){ theRealLay = document.layers[theName]; theBadX = self.pageYOffset; theBadY = self.pageXOffset; theRealX = theBadX+theWantX; theRealY = theBadY+theWantY; theRealLay.moveTo(theRealY,theRealX);}IE4 = (document.all) ? 1 : 0;NN4 = (document.layers) ? 1 : 0;if (document.all.border)//检测当前页面中是否有ID为"border"的层{ if (IE4) { setInterval('KB_keepItInIE("border",0,0)',1); } if (NN4) { setInterval('KB_keepItInNN("border",0,0)',1); }}//--></script> document.body.scrollTop//滚动条向下滚动的距离document.body.scrollLeft//滚动条向右滚动的距离document.body.scrollLeft+div.style.posLeft//当前层Left位置document.body.scrollTop+div.style.posTop//当前层Top位置 实现 自动触发Button1_Click 事件 请教 Ext3.3中grid的问题 1 通过prototype修改已有对象 求复杂的正则表达式写法。用于注册用户时真实姓名一项的判断!! 急!!!!!!! 在线求PhotoShop CS3的授权码 如何在提示窗口加上连接呢?谢谢 求树型菜单.具体请进. window.print()打印时的问题? 怎样定时刷新制定框架中的制定url? 看看这段代码,如果让它可以支持IE5?高分相赠! 很菜的问题 怎么用JS调用PHP的程序?
<img src="http://go.6to23.com/qingang1983/001/2003081634035280.gif">
</div>然后加入如下代码:<script Language="Javascript">
<!--
//以下是保持border层随窗口内容滚动而自动滚动
function KB_keepItInIE(theName,theWantTop,theWantLeft)
{
theRealTop = parseInt(document.body.scrollTop);
theTrueTop = theWantTop+theRealTop;
document.all[theName].style.top = theTrueTop;
theRealLeft = parseInt(document.body.scrollLeft);
theTrueLeft = theWantLeft+theRealLeft;
document.all[theName].style.left = theTrueLeft;
}function KB_keepItInNN(theName,theWantX,theWantY)
{
theRealLay = document.layers[theName];
theBadX = self.pageYOffset;
theBadY = self.pageXOffset;
theRealX = theBadX+theWantX;
theRealY = theBadY+theWantY;
theRealLay.moveTo(theRealY,theRealX);
}IE4 = (document.all) ? 1 : 0;
NN4 = (document.layers) ? 1 : 0;
if (document.all.border)//检测当前页面中是否有ID为"border"的层
{ if (IE4)
{
setInterval('KB_keepItInIE("border",0,0)',1);
} if (NN4)
{
setInterval('KB_keepItInNN("border",0,0)',1);
}
}
//-->
</script>
document.body.scrollLeft//滚动条向右滚动的距离
document.body.scrollLeft+div.style.posLeft//当前层Left位置
document.body.scrollTop+div.style.posTop//当前层Top位置