标题:
两侧浮动广告
[打印本页]
作者:
fangzhen
时间:
2008-12-1 12:51
标题:
两侧浮动广告
<script>
<!--
if( window.screen.width > 800 )
{
document.write("<div id=\"etang_left\" style=\"position:absolute; width:100px; height:115px; z-index:1; left: 20px; top: 80px\"><iframe width=85 height=434 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no bordercolor=#ffffff src=http://ads.etang.com/html.ng/SpaceDesc=homepage&location=left1> ");
document.write("a href=\"http://ads.etang.com/SpaceDesc=homepage&location=left1\" target=\"_blank\"><img src=\"http://ads.etang.com/image.ng/SpaceDesc=homepage&location=left1\" border=0 alt=\"click here\" width=\"85\" height=\"434\"></a> ");
document.write(" </iframe></div> ");
document.write("<div id=\"etang_right\" style=\"position:absolute; width:100px; height:115px; z-index:1; left: 985px; top: 80px\"><iframe width=85 height=434 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no bordercolor=#ffffff src=http://ads.etang.com/html.ng/SpaceDesc=homepage&location=right1> ");
document.write(" <a href=\"http://ads.etang.com/SpaceDesc=homepage&location=right1\" target=\"_blank\"><img src=\"http://ads.etang.com/image.ng/SpaceDesc=homepage&location=right1\" border=0 alt=\"click here\" width=\"85\" height=\"434\"></a>");
document.write(" </iframe></div>");
lastScrollY=0;
window.setInterval("renewplace()",1);
}
function renewplace()
{
diffY=document.body.scrollTop;
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
etang_right.style.pixelTop+=percent;
etang_right.style.left=document.body.scrollLeft + document.body.offsetWidth -120;
etang_left.style.pixelTop+=percent;
etang_left.style.left=document.body.scrollLeft+10;
lastScrollY=lastScrollY+percent;
}
-->
</script>
欢迎光临 PHP开发笔记 (http://phpvi.com/)
Powered by Discuz! 6.1.0