I am having 3 frames in one page. Frame 1 contains the heading, Frame 2 contains menus and frame 3 contains the pages. When I click the link in frame 2 the page is loading in frame 3. But when I right click and open with new tab if I give only that page is loading in new tab. I want to load that page with 3 frames only and the page should be loaded in third frame only.
我在一页中有3帧。第1帧包含标题,第2帧包含菜单,第3帧包含页面。当我单击第2帧中的链接时,页面将在第3帧中加载。但是当我右键单击并使用新选项卡打开时,如果我只提供该页面正在加载新选项卡。我想加载只有3帧的页面,页面只应加载到第三帧。
This means that if I in any way open that url, it has to load the page which contains 3 frames and the specified page should load in frame 3 only. Can anyone tell me how can I do this?.
这意味着如果我以任何方式打开该URL,它必须加载包含3帧的页面,并且指定的页面应仅在第3帧中加载。谁能告诉我怎么能这样做?
My frame markup is as follows
我的帧标记如下
<frameset framespacing="0" rows="140,*">
<frame id="head" frameborder="0" src="http://localhost:1359/WebSite1/Head.aspx" name="frame_a" scrolling="no" noresize="noresize" border="0" onload="framespacing='0'">
<frameset framespacing="0" cols="15%,80%">
<frame id="Menu" frameborder="0" src="http://localhost:1359/WebSite1/Menus.aspx" name="frame_b" >
<frame id="Page"frameborder="0" src="http://localhost:1359/WebSite1/HomePage.aspx" name="frame_c" style="background-color:White" >
</frameset>
</frameset>
3 个解决方案
#1
1
You open a link in a specific frame by using the target attribute of the anchor element.
您可以使用anchor元素的target属性在特定框架中打开链接。
<a href="page.html" target="frameid">Link</a>
#2
1
target=""
attribute of your <a>
(anchor) is designed to do this.
Specify the ID of the frame, or use one of the "special" targets:
指定框架的ID,或使用“特殊”目标之一:
-
_blank
(new page) - _blank(新页面)
_top
- _最佳
_parent
- _parent
_self
- _自
More info can be found here.
更多信息可以在这里找到。
#3
0
Please use On a button click event (or some other event):
请使用按钮点击事件(或其他一些事件):
Response.Write("<script>window.open('PageName.aspx','FrameName');</script>")
#1
1
You open a link in a specific frame by using the target attribute of the anchor element.
您可以使用anchor元素的target属性在特定框架中打开链接。
<a href="page.html" target="frameid">Link</a>
#2
1
target=""
attribute of your <a>
(anchor) is designed to do this.
Specify the ID of the frame, or use one of the "special" targets:
指定框架的ID,或使用“特殊”目标之一:
-
_blank
(new page) - _blank(新页面)
_top
- _最佳
_parent
- _parent
_self
- _自
More info can be found here.
更多信息可以在这里找到。
#3
0
Please use On a button click event (or some other event):
请使用按钮点击事件(或其他一些事件):
Response.Write("<script>window.open('PageName.aspx','FrameName');</script>")