当前位置: 代码迷 >> ASP.NET >> 很简单的有关问题,不信就进来看看! (不再简单!)
  详细解决方案

很简单的有关问题,不信就进来看看! (不再简单!)

热度:1280   发布时间:2013-02-25 00:00:00.0
很简单的问题,不信就进来看看! (不再简单!!!!)
我有一个父页面A,里头有一个 <iframe   name= "state "   src= " "   width= "590px "   height= "700px ">   </iframe>
多个子页面1.htm   ,   2.htm   ,   3.htm   ,   4.htm   ,   5.htm.....

另外有一个页面B,页面B有多个链接,这些链接分别是用来链接到页面A的,但不同的是每个链接要在页面A的 <iframe> 打开其指定的子页面。不如说页面B的链接1要打开页面A,并使得页面A的 <iframe> 打开子页面1

请问这个效果怎么实现?URL怎么处理呢?
页面A
---------------------------------------------------------------------


<iframe   name= "state "   src= " "   width= "590px "   height= "700px ">   </iframe>


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


页面B
--------------------------------------------------
链接1   链接2   链接3   链接4   链接5  

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

------解决方案--------------------------------------------------------
在页面A里面写javascript
<script type= "text/javascript ">
function frameopen()
{
if(document.referrer= "页面B的URL ")
windows.iframe.location.replace( '1.htm ');
}
windows.onload=frameopen();
</script>
  相关解决方案