2012年11月8日

jQuery 获取屏幕高度、宽度(轉)

摘要: 做手机Web开发做浏览器兼容用到了,所以在网上找了些汇总下。alert($(window).height()); //浏览器当前窗口可视区域高度 alert($(document).height()); //浏览器当前窗口文档的高度 alert($(document.body).height());//浏览器当前窗口文档body的高度 alert($(document.body).outerHeight(true));//浏览器当前窗口文档body的总高度 包括border padding margin alert($(window).width()); //浏览器当前窗口可视区域宽度 ale 阅读全文

posted @ 2012-11-08 13:47 chickenrun 阅读(195) 评论(0) 推荐(0) 编辑

导航