js右下角广告[兼容]
<div style="position:absolute;right:0;width: 300px; height:280px; text-align:right; font-size:14px; line-height:22px; color:#000;" id="rb_ad"> <!--注意,height,280,和下面-260的,需要根据图片大小做个调整,本测试图为300x250大小--> <a href="javascript:close_rbad();" target="_self">关闭</a><br /> <img src="/images/AWt3tZQiel6.jpg"" border="0"> </div> <script language="JavaScript" type="text/javascript"> function rightBottomAd(){ var abc = document.getElementById("rb_ad"); var scrollTop=document.documentElement.scrollTop??document.body.scrollTop; var clientHeight=document.documentElement.clientHeight; abc.style.top = scrollTop + clientHeight-260+"px"; setTimeout(function(){rightBottomAd();},100); } rightBottomAd(); function close_rbad(){ document.getElementById("rb_ad").style.display="none"; } </script>