国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

window object

JavaScript can obtain many objects provided by the browser and perform operations.

window

The window object not only serves as the global scope, but also represents the browser window.

The window object has innerWidth and innerHeight properties, which can get the internal width and height of the browser window. The internal width and height refers to the net width and height used to display the web page after removing placeholder elements such as menu bars, toolbars, and borders.

Compatibility: IE<=8 is not supported.

<html>
<head>
    <script>
        'use strict';
        alert('window inner size: ' + window.innerWidth + ' x ' + window.innerHeight);
    </script>
</head>
<body>
</body>
</html>

Correspondingly, there is also an outerWidth and outerHeight attribute, which can obtain the entire width and height of the browser window.


Continuing Learning
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>window對象</title> <script type="text/javascript"> function myFunction() { alert("歡迎來到phpd中文網(wǎng)") window.open('http://www.miracleart.cn','_blank','width=600 height=400') } </script> </head> <body> <form> <input type="button" value="點擊我,打開新窗口" onclick="myFunction()" /> </form> </body>
submitReset Code