JS兼容所有浏览器获取浏览器高度和宽度

var w = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
var h = window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;

你可能感兴趣的:(javascript,javascript)