iframe.location=location.search.split("=")[1]

解决方案 »

  1.   

    <IFRAME id="iframe" WIDTH=300px HEIGHT=300px src="<%=request("src")%>">
    </IFRAME>
      

  2.   

    to:风云  要JavaScript方式TO:emu
    按你的方法做了
    B.htm如下:
    <html>
    <head>
    <SCRIPT LANGUAGE="JScript">
    ifr.location=location.search.split("=")[1];
    </SCRIPT>
    </head>
    <body>
    <IFRAME Name=ifr id=ifr WIDTH=300px HEIGHT=300px>
    </IFRAME>
    </body>
    </html>最后运行是说网页上有错误,没有显示
      

  3.   

    页面B:
    <body>
    <IFRAME id="iframe" WIDTH=300px HEIGHT=300px src="c.htm">
    </IFRAME>
    </body>
      

  4.   

    iframe必须放在函数的上面
    <IFRAME Name=ifr id=ifr WIDTH=300px HEIGHT=300px>
    </IFRAME>
    <SCRIPT LANGUAGE="JScript">
    ifr.location=window.location.href.split("=")[1];
    </SCRIPT>
      

  5.   

    function window_onload() {
    var g;
    g=opener.document.all.Form1.hideurl.value

    document.frames["ifrwin"].location = g;
    </HEAD>
    <body MS_POSITIONING="GridLayout" oncontextmenu="return false;" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" style="OVERFLOW-Y:hidden;OVERFLOW-X:hidden" language="javascript" onload="return window_onload()">
    <form id="Form1" method="post" runat="server" onsubmit="return false;">

    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#3a3a84" onfocus="def_set()">
    <tr id="aa">
    <td>&nbsp;</td>
    <td > </td>
    </tr>
    <tr height="98%">
    <td colspan="2"><iframe id="ifrwin" frameborder="0" width="100%" height="100%" scrolling="yes"></iframe>
    </td>
    </tr>
    </table>
    </form>
    </body>
    </HTML> }
      

  6.   

    wyfwyf2000(云风) 谢谢
    调通了
      

  7.   

    呵呵,照抄书怎么成,要理解呀。<html>
    <head>
    <SCRIPT LANGUAGE="JScript">
    ifr.location=location.search.split("=")[1];
    </SCRIPT>
    </head>
    <body>
    <IFRAME Name=ifr id=ifr WIDTH=300px HEIGHT=300px>
    </IFRAME>
    </body>
    </html>先调用了ifr再定义它,当然要出错了。要么给script加defer,要么在onload里面调用,再不然把script挪到iframe下面去。