<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=2.0" name="viewport"/>
<title>获取当前对象大小以及屏幕分辨率等</title>
<body>
<script src="https://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
document.write("BODY对象宽度"+document.body.clientWidth+"<br>");
document.write("BODY对象高度"+document.body.clientHeight+"<br>");
document.write("可见区域宽度"+document.documentElement.clientWidth+"<br>");
document.write("可见区域高度"+document.documentElement.clientHeight+"<br>");
document.write("网页可见区域宽"+document.body.clientWidth+"<br>");
document.write("网页可见区域高"+document.body.clientHeight+"<br>");
document.write("网页可见区域宽(包括边线的宽)"+document.body.offsetWidth+"<br>");
document.write("网页可见区域高(包括边线的高)"+document.body.offsetHeight+"<br>");
document.write("网页正文全文宽"+document.body.scrollWidth+"<br>");
document.write("网页正文全文高"+document.body.scrollHeight+"<br>");
document.write("网页被卷去的高"+document.body.scrollTop+"<br>");
document.write("网页被卷去的左"+document.body.scrollLeft+"<br>");
document.write("网页正文部分上"+window.screenTop+"<br>");
document.write("网页正文部分左"+window.screenLeft+"<br>");
document.write("屏幕分辨率的高"+window.screen.height+"<br>");
document.write("屏幕分辨率的宽"+window.screen.width+"<br>");
document.write("屏幕可用工作区高度"+window.screen.availHeight+"<br>");
document.write("屏幕可用工作区宽度"+window.screen.availWidth+"<br>");
</script>
</body>
</html>