New window opens."> How to set a webpage to open in a new window-HTML Tutorial-php.cn

How to set a webpage to open in a new window

angryTom
Release: 2019-07-24 11:18:59
Original
11870 people have browsed it

How to set a webpage to open in a new window

Recommended tutorial:Html tutorial

Setting the web page to open the code in a new window

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 thetag of the document title.

_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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!