The target property 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 the order: new window, current window, parent window, top window and frame. When the frame of the referred name does not exist, the customization function is equivalent to _blank. Today we mainly test in which framework the link opens when the frame of the referred name is in different hierarchical pages or in different hierarchical pages?
1. Test1. Test 1: The frame with the specified name is in different levels of pages
index.htm:
<iframe name=frame1 src= width=400 height=400></iframe>
<iframe src=aaa.htm width=400 height=400></iframe>
aaa.htm:
<iframe name=frame2 src=bbb.htm width=300 height=300></iframe>
<a href=http://www.CuoXIn.com/ target=frame1>Links</a>
bbb.htm:
<iframe name=frame3 src= width=200 height=200></iframe>
Test results:
When target=frame1, open in index.frame1; (For convenience of explanation, the frame location is uniformly used with the page name. Frame name format)
When target=frame2, open in aaa.frame2;
When target=frame3, open in bbb.frame3;
2. Test 2: There are frames with the same name in different levels of pages
index.htm:
<iframe name=frame1 src= width=400 height=400></iframe>
<iframe src=aaa.htm width=400 height=400></iframe>
aaa.htm:
<iframe name=frame2 src=bbb.htm width=300 height=300></iframe>
<a href=http://www.CuoXIn.com/ target=frame2>Links</a>
bbb.htm:
<iframe name=frame2 src= width=200 height=200></iframe>
Test results:
When target=frame2, open in aaa.frame2;
3. Test 3: There are frames with the same name in different levels of pages
index.htm:
<iframe name=frame2 src= width=400 height=400></iframe>
<iframe src=aaa.htm width=400 height=400></iframe>
aaa.htm:
<iframe name=frame2 src=bbb.htm width=300 height=300></iframe>
<a href=http://www.CuoXIn.com/ target=frame2>Links</a>
bbb.htm:
<iframe name=frame3 src= width=200 height=200></iframe>
Test results:
When target=frame2, open in aaa.frame2;
4. Test 4: There are frames with the same name in pages at different levels
index.htm:
<iframe name=frame1 src= width=400 height=400></iframe>
<iframe src=aaa.htm width=400 height=400></iframe>Total 2 pages Previous page 12 Next page