视口的宽和高
var pw = window.innerWidth,
ph = window.innerHeight;
if(typeof pw != "number"){
pw = document.documentElement.clientWidth;
ph = document.documentElement.clientHeight;
}
console.log(pw,ph);
视口的宽和高
var pw = window.innerWidth,
ph = window.innerHeight;
if(typeof pw != "number"){
pw = document.documentElement.clientWidth;
ph = document.documentElement.clientHeight;
}
console.log(pw,ph);
转载于:https://www.cnblogs.com/xupeiyu/p/4677252.html