$(document).ready(function()
{
alert($(window).height()); //浏览器时下窗口可视区域高度
alert($(document).height()); //浏览器时下窗口文档的高度
alert($(document.body).height());//浏览器时下窗口文档body的高度
alert($(document.body).outerHeight(true));//浏览器时下窗口文档body的总高度 包括border padding margin
alert($(window).width()); //浏览器时下窗口可视区域宽度
alert($(document).width());//浏览器时下窗口文档对于象宽度
alert($(document.body).width());//浏览器时下窗口文档body的高度
alert($(document.body).outerWidth(true));//浏览器时下窗口文档body的总宽度 包括border padding margin
}
)
JQuery获取浏览器窗口的高度和宽度
原创
©著作权归作者所有:来自51CTO博客作者282030166的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
js获取浏览器高度和宽度值(多浏览器)
js获取浏览器高度和宽度值,尽量的考虑了多浏览器
高度 html 取对象 工作区 -
jquery获取浏览器和屏幕的高度和宽度
jquery获取浏览器和屏幕的高度和宽度1、实现源码 jquery获取浏览器和屏幕的高度和宽度 获取浏览器当前窗口可视区域高度 ...
html jquery javascript 知识