绝对好用的右侧漂浮

<script>
    var d, str;
    window.onload = window.onscroll = function () {
       d = document.getElementById("d");
       str = "<strong>" + ((document.compatMode.toLowerCase().indexOf("back") >= 0) ? "Quirks" : "Standards") + "</strong><br />"
           + "document.documentElement.scrollTop:" + document.documentElement.scrollTop + "<br />"
           + "document.body.scrollTop:" + document.body.scrollTop;
       d.innerHTML = str;
    }
</script>
<body style="font:12px Arial; _background-attachment:fixed; _background-image:url(about:blank);">
<div style="height:10000px;"></div>
<div id="d" style="position:fixed; top:0; left:0; _position:absolute; _top:expression(offsetParent.scrollTop); _left:expression(offsetParent.scrollLeft); background:#ddd;"></div>
</body>

你可能感兴趣的:(js,FF,休闲,IE6IE7IE8,CHEMOE)