如何获取可用区域的高度 通过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]//高 请问如何把通过JS取得值赋给表单中某个隐藏控件? 气疯了,大家帮忙看看这个函数的参数为什么传不过去!! 关于JS操作Windows Media Player 如何遍历页面中的所有控件 初学,问问运行完函数后页面完为什么会自动刷新。 谁有10进制转换成16进制的函数 哈哈,COME ON 为什么在设置TEXTAREA的属性时,在〈TABLE〉〈/TABLE〉中就可以,而在外面就不可以?具体看里面的代码。急啊!!!! 该如何把下列字符串放入数组?? 关于 javascript 的问题 问下这样写的闭包函数的好处在那? 关于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]//高