更新时间:2023-01-04 13:33:42
function width(){
return window.innerWidth
|| document.documentElement.clientWidth
|| document.body.clientWidth
|| 0;
}
function height(){
return window.innerHeight
|| document.documentElement.clientHeight
|| document.body.clientHeight
|| 0;
}
使用它们返回 height()可见窗口的code>或
width()
。