国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

App下載
首頁(yè)javascriptscrolljQuery Style - 如何獲取DIV標(biāo)簽的向左滾動(dòng)偏移量

jQuery Style - 如何獲取DIV標(biāo)簽的向左滾動(dòng)偏移量

我們想知道如何獲取DIV標(biāo)簽的向左滾動(dòng)偏移量。


<html>
  <head>
    <script type="text/javascript" src='http://code.jquery.com/jquery-1.5.2.js'></script>
    <script type="text/javascript">
        $(document).ready(function(){
             console.log($("div").scrollLeft());
        });
    </script>
    <style>
    div{
        width:200px;
        height:100px;
        overflow:auto;
    }
    h1 { width:1000px;height:1000px; }
  </style>

  </head>
  <body>
      <div><h1>header 1</h1></div>
  </body>
</html>