说明
显示浏览器窗口的高度和宽度
示例
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>显示浏览器窗口的高度和宽度</title> <link rel="stylesheet" href=""> </head> <body> <script type="text/javascript"> var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; var hidth = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; document.write(w + " " + h); </script> </body> </html>