Base target = “” control the target opening frame of the link

Time:2019-11-14

< base target = _blank > is to change the target framework of basic links to open new pages. If you are not familiar with HTML, CSS and JS, it is not recommended to use this method instead of independent control.

In fact, many tags, such as < a >, < form >, support the attribute of target = “black”. It is recommended to set them separately in such tags, such as:

Copy code

The code is as follows:

< a href = “XXX. HTM” target = “_blank” > hyperlink content</a>
< form action = “XXX. HTM” target = “_blank” > express content < input type = “submit” value = “submit button” > < / form >

If you do not add this sentence, the default is to refresh this page, that is, target = “.

Copy code

The code is as follows:

<base target=Right>

The function of this statement is to add target = right to all < a href =… > link instructions without specifying target, which has nothing to do with your < Select >.

For example, your original program is as follows:

Copy code

The code is as follows:

<base target=Right>
< a href = P1. HTML > first page</a>

< a href = P2. HTML > page 2</a>

< a href = I1. HTML target = _blank > Home Page</a>

< a href = I2. HTML target = [self > refresh</a>

So it’s exactly equivalent to the following code:

Copy code

The code is as follows:

< a href = P1. HTML target = right > first page</a>

< a href = P2. HTML target = right > page 2</a>

< a href = I1. HTML target = _blank > Home Page</a>

< a href = I2. HTML target = [self > refresh</a>

It has no effect on any other code. The above target = right indicates that it is in the frame named right (or Zhen, frame). If there is no window called right, a new window will be opened and named right. The next time you open other right pages, you will open them in this window. Target = ﹣ blank means to open in a new window, and target = ﹣ self means to open in the current window.