documentHeight,windowHeight,一般用于实现滚动刷新效果
documentHeight: 文档高度
windowsHeight: 窗口高度 <= documentHeight
界面
<input type="button" value="测试" onclick="test()"/>
<br>
documentHeight:<span id="documentHeight"></span><br>
windowHeight:<span id="windowHeight"></span><br>
js操作逻辑
<script type="text/javascript" src="js/jquery-1.3.1.js"></script>
<script type="text/javascript" src="js/avalon.js.js"></script>
function test(){
var documentHeight=$(document).height(); //文档的高度
$("#documentHeight").html(documentHeight);
var windowHeight=$(window).height(); //浏览器窗口可视化的高度
$("#windowHeight").html(windowHeight);
}
效果: