$(window).width();$(window).height();严格来说,获取window才对
parseInt(screen.width)/2
alert($(window).width()); //浏览器当前窗口宽度
$("#id").offset().top 获取控件在整个页面的位置 $("#id").height() 获取控件的高度
移动端设备的宽度要加一个meat标签才能正确识别.width指令使用device-width标记可以指示视区宽度应为设备的屏幕宽度.关于meat viewport的更多用法去百度一下吧
alert($(window).height()); //浏览器时下窗口可视区域高度alert($(document).height()); //浏览器时下窗口文档的高度alert($(document.body).height());//浏览器时下窗口文档body的高度alert($(document.body).outerHeight(true));//浏览器时下窗口
jQuery 获取屏幕高度、宽度<br>做手机Web开发做浏览器兼容用到了,所以在网上找了些汇总下.<br>alert($(window).height()); //浏览器当前窗口可视区域高度 <br>alert($(document).height()); //浏览器当前窗口文档的高度 <br>alert($(document.body
你这下面也没东西啊.JS 就是document.documentElement.clientWidth || document.body.clientWidth JQ就是$(window).width()
通过width方法取得div的宽度.1、定义一个div节点12212、通过jquery获取宽度$('#divtest').width();//$('#divtest')是根据id过滤器找到对应的div节点,width()是获取div的宽度
包含边框的宽度 = $(window).width();包含边框的高度 = $(window).height();不包含边框的宽度 = $(document).width();不包含边框的高度 = $(document).height();