JavaScript window function guide to play window features

zhaozj2021-02-08  234

JavaScript window function guide to play window features

(Author: hear the wind compiler 2001 at 11:35 on January 19)

In the previous section, we have fully contacted the window features provided by JavaScript. Many of these features are based on special browsers, that is, they cannot work in Internet Explorer and Navigator at the same time. In this section, we will explore a few interesting aspects and some useful techniques. Specify window scales We use parameters Height, Width, InnerHeight, and InnerWidth to define the scale of the new window. Internet Explorer supports Height and Width, Navigator uses InnerHeight and InnerWidth. Navigator also supports OuterHeight and OuterWidth feature, which specifies the scale of the peripheral boundary of the window, the peripheral boundary including the title bar, scroll bar, and other operating system elements. In Internet Explorer, we use Height, Width, InnerHeight, and InnerWidth. Each browser will ignore other features, so when you create a new window, you can define all four. Window.open ("Dimensions.html", "_blank", "Height = 150, InnerHeight = 150, Width = 200, InnerWidth = 200"); if there is two browsers on your machine, you can compare JavaScript Different window scale features. Open a full-screen window Internet Explorer support the fullscreen property, use it to create a window overwriting full screen without having to consider the actual size of the display. Take a look at the example below: