Javascript-target = "_ blank" is different from target = "blank!

Source: Internet
Author: User
Tags blank page
Target & quot; _ blank & quot; The Link opened on the new tag always thinks that target & quot; blank & quot; is a wrong way of writing. I didn't expect it to be effective: when the tag has already been opened, the new tag will not be opened again after the second click. Instead, the previous tag will be refreshed. Why is it so amazing? What is the special function !... target="_blank"Open link in new tag

Always thoughttarget="blank"It's a wrong way of writing. I didn't expect it to be effective:

When the tag has already been opened, the new tag will not be opened again after the second click. Instead, the previous tag will be refreshed. Why is it so amazing? What is the special function!

Check it,targetNo standard attributeblankThis value is really strange.

Hope you can give me some advice.

PS: It seems like the currentHTML5There are similar functions. clicking a link like Netease music won't refresh the page, it won't interrupt the currently playing music, it can also changeURLI don't know how this effect works.

Reply content:

target="_blank"Open link in new tag

Always thoughttarget="blank"It's a wrong way of writing. I didn't expect it to be effective:

When the tag has already been opened, the new tag will not be opened again after the second click. Instead, the previous tag will be refreshed. Why is it so amazing? What is the special function!

Check it,targetNo standard attributeblankThis value is really strange.

Hope you can give me some advice.

PS: It seems like the currentHTML5There are similar functions. clicking a link like Netease music won't refresh the page, it won't interrupt the currently playing music, it can also changeURLI don't know how this effect works.

_ Blank is to open a new page
Blank is used to open a page and name it "blank". When a blank page exists, it works with a new page (here it is replaced with another non-_ blank, _ top, etc.).

targetAttribute settings are not_blank,_topThe predefined values are the names of the window that opens the link. If the window does not exist, a new window is created. If the window already exists, the window is opened.

For modern browsers, "window" refers to "tab ".

Yqb's answer is correct.
The predefined values of target include four. Other values indicate framename, that is, the link is opened in the specified framework. If the specified framework does not exist, a new page or tab is created as the framework.

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.