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?
黄舟2017-06-20 10:08:42
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 && C
etc., so I think you define these features as a set of numerical constants, Then just switch
.