亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

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://ipnx.cn','_blank','width=600 height=400') } </script> </head> <body> <form> <input type="button" value="點(diǎn)擊我,打開新窗口" onclick="myFunction()" /> </form> </body>
submitReset Code