我需要一个Js/JQuery脚本,它返回浏览器的可用宽度和高度,不包括菜单栏和工具栏大小,我使用一个脚本,但它似乎正在返回宽度/高度包括工具栏等...获取浏览器宽度和高度排除工具栏和菜单大小
下面的脚本我用..
<script type="text/javascript" >
var winWidth = 0, winHeight = 0;
if (typeof (window.innerWidth) == 'number') {
//Non-IE
winWidth = window.innerWidth;
winHeight = window.innerHeight;
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
//IE 6+ in 'standards compliant mode'
winWidth = document.documentElement.clientWidth;
winHeight = document.documentElement.clientHeight;
} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
//IE 4 compatible
winWidth = document.body.clientWidth;
winHeight = document.body.clientHeight;
}
</script>
任何机构对此有什么线索? 谢谢 Meghana
谢谢@Mathboy,但我知道我的帖子如果不符合我的要求......我在添加新帖子... plz帮助我,如果您有任何想法以及:) – meghana 2012-02-23 07:30:33