document.body.scrollTop : body : HTML Tags JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » HTML Tags » body »

 

document.body.scrollTop

















<html>
    <head>
        <title>OnScroll Example</title>
        <script type="text/javascript">
            window.onload = function () {
                var oWatermark = document.getElementById("divWatermark");
                oWatermark.style.top = document.body.scrollTop;
            }
        </script>
    </head>
<body>
<div id="divWatermark" style="position: absolute; top: 0px; right: 0px; color: #cccccc; width: 150px; height: 30px; background-color: navy">www.navioo.com</div>
</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo HTML Tags
» body