当前位置: 代码迷 >> JavaScript >> JS 取目前窗口大小的函数
  详细解决方案

JS 取目前窗口大小的函数

热度:75   发布时间:2012-10-31 14:37:32.0
JS 取当前窗口大小的函数
function getWindowSize(){
    return {
                Width:Math.max(document.body.scrollWidth,document.documentElement.clientWidth),
                Height:Math.max(document.body.scrollHeight,document.documentElement.clientHeight)
             }
}
  相关解决方案