New window opens.">
Recommended tutorial:Html tutorial
Setting the web page to open the code in a new window
新窗口打开
原窗口打开 自身窗口打开 name="aa"的框架页面打开
Extended information
The meaning of the Target attribute
The target attribute of thetag specifies where to open the link document.
If you include a target attribute within antag, the browser will load and display the document in the frame or window named with the tag's href attribute and whose name matches the target. If the frame or window with the specified name or id does not exist, the browser will open a new window, give the window the specified tag, and then load the new document into that window. From now on, hyperlinked documents can point to this new window.
There are 4 reserved target names used for special document redirection operations:
_blank
The browser always loads the target document in a newly opened, unnamed window.
_self
The value of this target is the default target for alltags that do not specify a target, which causes the target document to be loaded and displayed in the same frame. Or as a source document in the window. This target is redundant and unnecessary unless used in conjunction with the target attribute in the
_parent
This goal causes the document to be loaded into the parent window or frameset containing the frame referenced by the hyperlink. If this reference is in a window or in a top-level frame, it is equivalent to target _self.
_top
This goal causes the document to load into the window containing the hyperlink. Using the _top goal will clear all contained frames and load the document into the entire window. browser window.
Tip: All 4 values of these targets start with an underscore. Any other window or object that begins with an underscore will be ignored by the browser, so do not use an underscore as the first character of any frame name or id defined in the document.
The above is the detailed content of How to set a webpage to open in a new window. For more information, please follow other related articles on the PHP Chinese website!