如何获取可用区域的高度 通过window.screen.availHeight可以获取,但是当浏览器不是最大化的时候,如何获取可用区域的高度。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function getScreenSize(){ var theWidth,theHeight; if (window.innerWidth) { theWidth = window.innerWidth theHeight = window.innerHeight } else if (document.compatMode=='CSS1Compat') { theWidth = document.documentElement.clientWidth theHeight = document.documentElement.clientHeight } else if (document.body) { theWidth = document.body.clientWidth theHeight = document.body.clientHeight } var result = [theWidth,theHeight]; return result;}var w = getScreenSize[0]//宽var h = getScreenSize[1]//高 javaScript 菜鸟提问:请问怎么实现图片下拉效果 100分求js效果 area map热点鼠标移动上显示div 图层 大虾,帮我解决下 一个onload事件的问题 在onmouseout中关闭一个层 有关onsubmit的问题 怎么把<select>下拉列表中的选项全部删掉呢? 问个关于JS代码时机的问题 请教Js编写类的问题 问下这样写的闭包函数的好处在那? 关于javascript外部链接
{
var theWidth,theHeight;
if (window.innerWidth)
{
theWidth = window.innerWidth
theHeight = window.innerHeight
}
else if (document.compatMode=='CSS1Compat')
{
theWidth = document.documentElement.clientWidth
theHeight = document.documentElement.clientHeight
}
else if (document.body)
{
theWidth = document.body.clientWidth
theHeight = document.body.clientHeight
}
var result = [theWidth,theHeight];
return result;
}var w = getScreenSize[0]//宽
var h = getScreenSize[1]//高