怎么才能让网页(.htm)打开时,自动被嵌入到另一个网页的iframe中?
比如:有一个网页a.htm,里面有一个iframe,有另一个网页b.htm,
怎么才能让b.htm被嵌入到a.htm的iframe中,让a.htm和b.htm同时打开?
我想把a.htm作为模板,在每个网页中都显示a.htm的内容。

解决方案 »

  1.   

    a.htm里面写js 
    iframeName.location.href="b.htm"
      

  2.   

    <%@ include file="b.htm"%>
    b.htm路径需要写正确。
      

  3.   

    <iframe width="100%" height="100%" src="b.htm" frameborder="0" scrolling="no" id="frm_id" name="frm_name" style="padding: 0px; margin: 0px" >
    </iframe>
      

  4.   

    我的链接是:
    <a href="/b.htm">b</a>
    <a href="/c.htm">c</a>
    <a href="/d.htm">d</a>
    ...
    我想让b.htm、c.htm、d.htm...打开时,都自动嵌入到a.htm的iframe中,怎么做啊
      

  5.   

    a.htm
    -----------------
    <script>
    url=searchstr.replace(/(url=)(.*)/,"$2");
    myframe.location.href=url;
    </script>
    这是a页面,将在iframe里打开传递的页面
    <iframe name=myframe frameborder=0></iframe>在link.html里
    <a href="a.htm?url=b.htm">b</a>
    <a href="a.htm?url=c.htm">c</a>
    <a href="a.htm?url=d.htm">d</a>
      

  6.   

    <a href="/b.htm" target="ft">b</a>
    <a href="/c.htm" target="ft">c</a>
    <a href="/d.htm" target="ft">d</a>
    <iframe name="ft" src="about:blank"></iframe>