Home > Web Front-end > HTML Tutorial > base target=''Control the target of the link to open the frame

base target=''Control the target of the link to open the frame

高洛峰
Release: 2017-02-28 13:23:09
Original
1612 people have browsed it

is to change the target frame of the basic link to open in a new page. Changing _blank can change the opened target frame. The following is a summary through an example. changes the target frame of the basic link to open a new page. If you are not very familiar with HTML, CSS and JS, it is not recommended to use this method and control it independently.

In fact, many tags such as and

support the target="black" attribute. It is recommended to set it separately in such tags, such as:

<a href="xxx.htm" target="_blank">超链接内容</a> 
<form action="xxx.htm" target="_blank">表达内容<input type="submit" value="提交按钮"></form>
Copy after login


If you do not add this sentence, the default page will be refreshed, that is, target="_self".

<base target=Right>
Copy after login


The function of this statement is to add target=Right to all
link instructions that do not specify a target. For your < ;select>It doesn't matter.

For example, your original program is as follows:


<base target=Right>
First page

Second page

Home page

Refresh


##Then it is completely equivalent to the following code:

<a href=p1.html target=Right>第一页</a>

<a href=p2.html target=Right>第二页</a>

<a href=i1.html target=_blank>首页</a>

<a href=i2.html target=_self>刷新</a>
Copy after login


has no effect on any other code. The above target=Right means that it is in the frame named Right (or Zhen, FRAME). If there is no window named Rigth , then open a new window and name it Right. Next time you open other pages to Right, they will be opened in this window. target=_blank means opening in a new window, target=_self means opening in the current window.

For more base target=""Control the target of the link to open the frame related articles, please pay attention to the PHP Chinese website!



Related labels:
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template