What are the differences between target = & quot; _ new & quot; and & quot; _ blank & quot !, _ New_blank

Source: Internet
Author: User

Differences between target = "_ new" and "_ blank !, _ New_blank

To solve this problem, let's look at the results of the three-Section code:

Code1:

<Html> <! -- Call the two codes whose target is new and blank respectively --> <frame name = "left" src = "t_new.html"> <frame name = "right" src = "t_blk.html"> </frameset> 

Code2:

<Html> <! -- The target here is _ new --> <a href = "t_new.html" target = "_ new"> new anchor </a> </body> 

Code3:

<Html> <! -- Here the target is _ blank --> <a href = "t_blk.html" target = "_ blank"> blank a new anchor </a> </body> 

This is to compare the two, so we use a frameset to put the two sections of Code together for demonstration. Of course, we can also use two or three sections of Code separately for comparison.

Then, run code1 and you will find this result in the browser:

Let's first look at the results of _ new:

After clicking the link, we will find that the page is being refreshed. The result of _ blank is:

Click the link and you will find:

Multiple new windows are generated.

Result:

Target = "_ new" always in the same new window (refresh)

Target = "_ blank" always produces different new windows

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.