首页javascriptheightjQuery Style - 如何检查文档高度和窗口高度之间的差异

jQuery Style - 如何检查文档高度和窗口高度之间的差异

我们想知道如何检查文档高度和窗口高度之间的差异。

    
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.7.1.js'></script>
<script type='text/javascript'>
$(window).load(function(){
    console.log ($(document).height() - $(window).height());
});
</script>
</head>
<body>
</body>
</html>