Create a hyperlink to test _ HTML/Xhtml _ target

Source: Internet
Author: User
The target attribute of the link determines where the link is opened. Its values are usually _ blank, _ self, _ parent, _ top, and custom: new window, current window, parent window, top-level window, and frame. When the framework of the name does not exist, the custom function is equivalent to _ blank. Today, we mainly test that when the target attribute of the framework with the specified name is in the link of different levels of pages determines where the link is opened, its value is usually as follows: _ blank, _ self, _ parent, _ top, and user-defined parameters are displayed as follows: new window, current window, parent window, top-level window, and frame. When the framework of the name does not exist, the custom function is equivalent to _ blank. Today, we will mainly test the framework in which the link is opened when the framework with the name is in different levels or in different levels?
I. Test
1. Test 1: the framework with the specified name is on different pages.
Index.htm:


Aaa.htm:

Links
Bbb.htm:

Test results:
When target = "frame1", open it in index. frame1. (For convenience, the frame location is in the format of "Page name. Framework name)
When target = "frame2", it is enabled in aaa. frame2;
When target = "frame3", it is enabled in bbb. frame3;
2. Test 2: frameworks with the same name exist in different levels of pages
Index.htm:


Aaa.htm:

Frame2 "> Links
Bbb.htm:

Test results:
When target = "frame2", it is enabled in aaa. frame2;
3. Test 3: frameworks with the same name exist in different levels of pages
Index.htm:


Aaa.htm:

Frame2 "> Links
Bbb.htm:

Test results:
When target = "frame2", it is enabled in aaa. frame2;
4. Test 4: frameworks with the same name exist in different levels of pages
Index.htm:


Aaa.htm:

Frame1 "> Links
Bbb.htm:

Test results:
When target = "frame1", it is enabled in bbb. frame1;
Ii. Conclusion
When you want to open a link, first search for the framework with the specified name (target) in this page. If not found, search for the framework on the lower-level page. If not found, search for the framework on the upper-level page, cannot be found to open a new window!

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.