【问题标题】:Get web page height through jQuery通过jQuery获取网页高度
【发布时间】:2011-06-12 15:11:13
【问题描述】:

如何使用 jquery 获取浏览器可查看网页的高度?我试过$(window).height(),但它没有返回准确的结果..谢谢..

【问题讨论】:

标签: javascript jquery


【解决方案1】:

来自 jQuery 文档:

$(window).height();   // returns height of browser viewport
$(document).height(); // returns height of HTML document

【讨论】:

    【解决方案2】:
    height=$(window).height();

    【讨论】:

      猜你喜欢
      • 2010-11-21
      • 2015-09-02
      • 1970-01-01
      • 1970-01-01
      • 2011-08-15
      • 1970-01-01
      • 2020-08-04
      • 1970-01-01
      • 2011-02-10
      相关资源
      最近更新 更多