Hum*_*ing 3 javascript css browser internet-explorer resize
我想获取窗口的高度和宽度,包括地址栏,状态栏等。
如何获得窗口的完整高度和宽度,如下图所示?

注意:我了解window.innerHeight和window.innerWidth。它不适合这种情况。window.innerHeight仅用于获取DOM高度。outerWidth也没有给出我想要的。
希望我们的堆栈用户将为跨浏览器兼容性提供一个好的解决方案。
如果您想要没有滚动条等,请使用它。
window.innerHeight; // for height
window.innerWidth; // for width
Run Code Online (Sandbox Code Playgroud)
否则,如果您要装满,请使用以下内容。
window.outerHeight; // for height
window.outerWidth; // for width
Run Code Online (Sandbox Code Playgroud)