JS浏览器和电脑分辨率宽高

1 let width = document.body.clientWidth  //浏览器宽度
2 let height= document.body.clientHeight  //浏览器高度
3 
4 //电脑分辨率
5 let cHeight = screen.height
6 let cWidth = screen.width
原文地址:https://www.cnblogs.com/lyt520/p/13578192.html