一、通过jQuery
获取
$(window).width();
$(window).height();
$(document).width();
$(document).height();
$(document.body).width();
$(document.body).height();
$(document.body).outerWidth(true)
$(document.body).outerHeight(true)
二、通过js
获取
document.body.clientWidth;
document.body.clientHeight;
document.body.offsetWidth;
document.body.offsetHeight;
document.body.scrollWidth
document.body.scrollHeight
document.body.scrollTop
document.body.scrollLeft
window.screenTop
window.screenLeft
window.screen.height
window.screen.width
window.screen.availHeight
window.screen.availWidth
三、html精确定位
scrollHeight
scrollLeft
scrollTop
scrollWidth
offsetHeight
offsetLeft
offsetTop
event.clientX
event.clientY
event.offsetX
event.offsetY
document.documentElement.scrollTop
event.clientX+document.documentElement.scrollTop