javascript - Is there any more compatible way to determine the type of browser window?
漂亮男人
漂亮男人 2017-06-20 10:06:42
0
1
678

Sometimes window.open will be used in the project to pop up some windows without operation options. I need a way to judge the type of these windows. I tried several properties in the picture below and found that they are not very reliable under IE. , does anyone have a better method that I can use to plagiarize?

漂亮男人
漂亮男人

reply all(1)
黄舟

You can add an attribute to the URL to identify the window type, such as: window.open = 'test.html?type=1' Then, you only need to get this type parameter to know the window type (if If the type does not exist, jump to the default type).
You can also see that a window will have many features, and sometimes multiple judgment conditions may need to be used, if A && B && Cetc., so I think you define these features as a set of numerical constants, Then just switch.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template