Test of hyperlink opening target (target)_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:44:58
Original
2058 people have browsed it

The target attribute of the link determines where the link is opened. Its values ​​are usually the following five: _blank, _self, _parent, _top and custom, which are expressed in turn as: new window, current window, parent window, top-level window and frame. When the frame with the specified name does not exist, the custom effect is equivalent to _blank. Today we mainly test which frame does the link open in when the frame of the named name is in a page of different levels or there are frames of the same name in pages of different levels?
1. Test
1. Test 1: The frames with the specified names are in different levels of pages
index.htm:


aaa.htm:

Links
bbb.htm:

Test results:
When target="frame1", open in index.frame1; (For convenience of explanation, the frame position uses the format of "page name.frame name")
When target="frame2" ", open in aaa.frame2;
When target="frame3", open in bbb.frame3;
2. Test 2: Frames with the same name exist in pages at different levels
index.htm:


aaa.htm:

frame2">Links
bbb.htm:

Test results:
When target="frame2", open in aaa.frame2;
3. Test 3: Frames with the same name exist in different levels of pages
index.htm:


aaa.htm:

frame2">Links
bbb.htm:

Test results:
When target="frame2", open in aaa.frame2;
4. Test 4: Frames with the same name exist in different levels of pages
index.htm:


aaa.htm:

frame1">Links
bbb.htm:

Test results:
When target="frame1", open in bbb.frame1;
2. Conclusion
When you want to open a link, first open it on this page Search for the frame with the specified name (target) in the frame. If it cannot be found, it will search in the lower page. If it cannot be found, it will search in the upper page. If it cannot be found, open a new window!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!