贫民窟里的程序高手

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

<!--对比弹窗js-->
<div id="float" style="position:absolute;"><a href="javascript:void(0);" onclick="gotop();" title="返回顶部" rel="nofollow"><img src="http://images.cnblogs.com/index_up.gif" alt=""/></a></div>
<script language="javascript">
    function gotop(){
        document.documentElement.scrollTop = 0;
    }
    function rightBottomAd() {
        var abc = document.getElementById("float");
        abc.style.top = document.documentElement.scrollTop + document.documentElement.clientHeight - 55 + "px";
        abc.style.left = document.documentElement.scrollLeft + document.documentElement.clientWidth - 55 + "px";
        setTimeout(function() { rightBottomAd(); }, 50);
    }
    rightBottomAd();
</script>

posted on 2011-11-01 13:39  贫民窟里的程序高手  阅读(190)  评论(0编辑  收藏  举报