function getClientSize() {
var c = window,
b = document,
a = b.documentElement;
if (c.innerHeight) {
return {
width: c.innerWidth,
height: c.innerHeight
}
} else {
if (a && a.clientHeight) {
return {
width: a.clientWidth,
height: a.clientHeight
}
} else {
return {
width: b.body.clientWidth,
height: b.body.clientHeight
}
}
}
}
时间: 2024-11-07 01:47:12