《网页两边悬浮窗广告代码》由会员分享,可在线阅读,更多相关《网页两边悬浮窗广告代码(2页珍藏版)》请在人人文库网上搜索。
1、悬浮广告/ 页面初始化function initEcAd() document.all.AdLayer1.style.posTop = 200;document.all.AdLayer1.style.visibility = visibledocument.all.AdLayer2.style.posTop = 200;document.all.AdLayer2.style.visibility = visibleMoveLeftLayer(AdLayer1);MoveRightLayer(AdLayer2);/ 移动左面的广告层function MoveLeftLayer(layerName。
2、) var x = 100;var y = 100;/ 左侧广告距离页首高度var diff = (document.body.scrollTop + y - document.all.AdLayer1.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval(document.all. + layerName + .style.posTop = parseInt(y);eval(document.all. + layerName + .style.posLeft = x);setTimeout(MoveLeftLaye。
3、r(AdLayer1);, 20);/ 移动右边的广告层function MoveRightLayer(layerName) var x = 100;var y = 100;/ 右侧广告距离页首高度var diff = (document.body.scrollTop + y - document.all.AdLayer2.style.posTop)*.40;var y = document.body.scrollTop + y - diff;eval(document.all. + layerName + .style.posTop = y);eval(document.all. + layerName + .style.posRight = x);setTimeout(MoveRightLayer(AdLayer2);, 20);initEcAd(。