日期:2014-05-19  浏览次数:20503 次

在框架文件中用 window.open 打开一个 pop.aspx 文件,想让里面的超链接的 target 为某一框架

页面   index.aspx   是由若干   框架文件组成的:

---------------------------------------------------

<FRAMESET   rows= "83,*,25 ">
<FRAME   name= "top1 "   src= "TopFrame.aspx "   scrolling= "no ">
<FRAMESET   name= "main "   cols= "200,9,* "     id= "main ">
<FRAME   name= "left "   src= "LeftFrame.aspx "   scrolling= "no "   id= "_left ">
<FRAME   src= "switch.html "   name= "control "   frameborder= "no "   scrolling= "no "   noresize>
<FRAME   name= "PageFrame "   src= "MainFrame.aspx "   id= "PageFrame "   scrolling= "yes ">
</FRAMESET>
<FRAMESET   name= "frbottom "   cols= "*,60 "   frameSpacing= "0 "   frameborder= "NO "   id= "frbottom ">
<FRAME   src= "down1.htm "   frameborder= "NO "   scrolling= "no ">
<FRAME   src= "DownFreshFrame.aspx "   frameborder= "NO "   scrolling= "no ">
</FRAMESET>
</FRAMESET>

------------------------------------------

假设   我在框架文件   DownFreshFrame.aspx   中用   window.open   打开了一个pop.aspx   页,其中pop.aspx   页中有一个超链接 <a   href= "messagelist.aspx "> 查看 <a>   我想当点击了这个超链接后,想在   index.aspx   中的框架   PageFrame   中显示,那这个超链接要如何写呢?

<a   href= "messagelist.aspx "> 查看 <a>  

不用超链接也行,用其它方法也可,只要能链过去就行




------解决方案--------------------
哟,写错了下,应该是:
<a href= "# " onclick= "javascrip:window.opener.parent.location.href= 'messagelist.aspx ';window.close(); "> 查看 </a>