1个回答
展开全部
"< DIV id=floater1 style="Z-INDEX: 100; LEFT: 10px; VISIBILITY: visible; WIDTH: 100px; POSITION: absolute; TOP: 160px; height: 100px;" >
左边的东西,可以是图片,表格
< /DIV >
< DIV id=floater style="Z-INDEX: 100; RIGHT: 10px; VISIBILITY: visible; WIDTH: 100px; POSITION: absolute; TOP: 160px; left: 890px;" >
右边的东西,可以是图片,表格
< /DIV >"
把下列代码存成文件包含到网页中就行了
menus.js的代码如下:
self.onError = null;
currentX = currentY = 0;
whichIt = null;
lastScrollX = 0; lastScrollY = 0;
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;
function heartBeat(objectid) {
if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }
if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
if(diffY != lastScrollY) {
percent = .1 * (diffY - lastScrollY);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) {
objectid = objectid.split(";");
for (i = 0; i < objectid.length; i++) eval("document.all."+objectid[i]).style.pixelTop += percent;
}
if(NS) {
objectid = objectid.split(";");
for (i = 0; i < objectid.length; i++) eval("document."+objectid[i]).top += percent;
}
lastScrollY = lastScrollY + percent;
}
if(diffX != lastScrollX) {
percent = .1 * (diffX - lastScrollX);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) {
objectid = objectid.split(";");
for (i = 0; i < objectid.length; i++) eval("document.all."+objectid[i]).style.pixelLeft += percent;
}
if(NS) {
objectid = objectid.split(";");
for (i = 0; i < objectid.length; i++) eval("document."+objectid[i]).left += percent;
}
lastScrollX = lastScrollX + percent;
}
}
if(NS || IE) action = window.setInterval("heartBeat(’floater;floater1’)", 2);
左边的东西,可以是图片,表格
< /DIV >
< DIV id=floater style="Z-INDEX: 100; RIGHT: 10px; VISIBILITY: visible; WIDTH: 100px; POSITION: absolute; TOP: 160px; left: 890px;" >
右边的东西,可以是图片,表格
< /DIV >"
把下列代码存成文件包含到网页中就行了
menus.js的代码如下:
self.onError = null;
currentX = currentY = 0;
whichIt = null;
lastScrollX = 0; lastScrollY = 0;
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;
function heartBeat(objectid) {
if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }
if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
if(diffY != lastScrollY) {
percent = .1 * (diffY - lastScrollY);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) {
objectid = objectid.split(";");
for (i = 0; i < objectid.length; i++) eval("document.all."+objectid[i]).style.pixelTop += percent;
}
if(NS) {
objectid = objectid.split(";");
for (i = 0; i < objectid.length; i++) eval("document."+objectid[i]).top += percent;
}
lastScrollY = lastScrollY + percent;
}
if(diffX != lastScrollX) {
percent = .1 * (diffX - lastScrollX);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) {
objectid = objectid.split(";");
for (i = 0; i < objectid.length; i++) eval("document.all."+objectid[i]).style.pixelLeft += percent;
}
if(NS) {
objectid = objectid.split(";");
for (i = 0; i < objectid.length; i++) eval("document."+objectid[i]).left += percent;
}
lastScrollX = lastScrollX + percent;
}
}
if(NS || IE) action = window.setInterval("heartBeat(’floater;floater1’)", 2);
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询