document.body.scrollTop : body « HTML Tags « JavaScript Tutorial

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

21.5.1.Call your function in body onClick event
21.5.2.body onload event
21.5.3.Use custom function as body onload event handler
21.5.4.You cannot set onload function to document.body.onload
21.5.5.body tag onStop event handler (IE)
21.5.6.OnUnload Example
21.5.7.Use alert dialog in body onresize event
21.5.8.Body onScroll event
21.5.9.Report document.body.scrollLeft and document.body.scrollTop