加到100分!
也就是说我怎样取到aa=scrollLeft的最后值,在拖动过程中的值不要.

解决方案 »

  1.   

    事件取 window.onscroll;
    值取:
    上:scrollTop;
    左: scrollLeft;
    高: scrollHeight;
    宽: scrollWidth;
      

  2.   

    为了 100 分, 之 99 出力了.
    <script language="javascript">
    function window.onscroll()
    {
    alert(document.body.scrollTop + "\n" +
    document.body.scrollLeft + "\n" +
    document.body.scrollHeight + "\n" +
    document.body.scrollWidth);
    }
    </script>当然得内容足够滚屏哦.
      

  3.   

    TO:cqdyh(Marksoft.NET)
    谢谢
    不过我想要得效果是:比如下面例子,在拖动scrollbar一次时,title只显示最后的scrollLeft值.
    <html>
    <head>
    <title>scrollTest</title>
    <script language="javascript">
    function test(){
    aa = tt.scrollLeft;
    document.title = aa;
    }</script>
    </head>
    <body style="margin:0px">
    <div id="tt" style="position:absolute; left:20px; top:20px; height:100px; width:1080px; overflow:scroll; border:1px; border-color:#000000; border-style:solid;" onscroll="test();">
       <div style="position:absolute; left:0px; top:0px; width:10000px; height:100%; ">
       </div>
    </div>
    </body>
    </html>