查了N多的资料,现在终于解决了,MD,自已写了一个,代码很简单!在FIREFOX IE7 IE6中我测了,没有问题,我想有很多都也在找这样的代码,贴出来和大家分享吧! 

复制代码 代码如下:

<div style="position:absolute;border:1px solid #000;right:0;" id="ad"><a href="http://www.zishu.cn">子鼠测试.</a></div>  
//这一行写了这个DIV是绝对定位,最好再加一下z-index;边框为1px的实线黑色边;距右边有0PX; ID=AD;  

<script language="JavaScript" type="text/javascript">  
function rightBottomAd(){  
 var abc = document.getElementById("ad");  
 abc.style.top = document.documentElement.scrollTop+document.documentElement.clientHeight-20+"px";//20是这个层的高度;   
 setTimeout(function(){rightBottomAd();},50);  
}  
rightBottomAd();  
</script>


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

点赞(76)

评论列表共有 0 条评论

立即
投稿
返回
顶部