侧边栏广告,随滚动条移动



[复制到剪切板]
CODE:
<html>
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<
title>侧边广告</title>
<
script language="javascript">
//设定相对位置
imgleft=125;
imgHeight=350;
//图片移动函数
function imgmove(){
mylayer.style.top=document.body.scrollTop+document.body.offsetHeight-imgHeight;
mylayer.style.left=document.body.offsetWidth-imgleft;
mylayer1.style.top=document.body.scrollTop+document.body.offsetHeight-imgHeight;
mylayer1.style.right=document.body.offsetWidth-imgleft;
setTimeout("imgmove()",80);
}
<\/
script>
</
head>

<
body onLoad="imgmove()">
<
h1>&nbsp;</h1>
<
h1>&nbsp;</h1>
<
h1>&nbsp;</h1>
<
h1>&nbsp;</h1>
<
h1>&nbsp;</h1>
<
h1>&nbsp;</h1>
<
h1>&nbsp;</h1>
<
h1>&nbsp;</h1>
<
h1>&nbsp;</h1>
<
h1>&nbsp;</h1>
<
h1>&nbsp;</h1>
<
h1>&nbsp;</h1>
<
div id="mylayer" style="position:absolute;width:64;top:300;hidden:visible;z-index:1"><img src="http://www.phpfans.net/bbs/customavatars/2.jpg" width="100" height="120"></div>
<
div id="mylayer1" style="position:absolute;width:64;top:300;hidden:visible;z-index:1"><img src="http://www.phpfans.net/bbs/customavatars/2.jpg" width="100" height="120"></div>
</
body>
</
html> ;

如履薄冰