<form id="Form1" method="post" runat="server">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="201">
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button>
</td>
<td width="792"><iframe id="right" width="100%" height="100%" frameborder="0" src="../login.aspx"></iframe>
</td>
</tr>
</table>
</form>
Button1.Attributes["onclick"]="on();";  <script>
on()
{
right.src="b.aspx";
}
</script>

解决方案 »

  1.   

    说明下  前一部分是FORM的代码
    中间是。CS的代码
    最后是JAVASCRIPT   
    高手帮忙啊  多谢了
      

  2.   

    改变IFRAME的Src属性 随时改变IFRAME页面中的内容 
      <script LANGUAGE="Javascript">
       <!--
       ns4=(document.layers)?true:false
       ie4=(document.all)?true:false
       function load(page){
       if(ns4) document.textFrame.src=page
       else if(ie4) parent.textFrame.document.location=page
       }
       //-->
    <a HREF="javascript:load('p1.htm')">调用p1</a><br> 
       <a HREF="javascript:load('p2.htm')">调用p2</a></p>
       
       <IFRAME SRC="p0.htm" NAME="textFrame" SCROLLING="auto" WIDTH="550" HEIGHT="100" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMEBORDER="No">
       </script>
     
      

  3.   

    我用了这个程序 可是说parent.textFrame.document为空 或不是对象
      

  4.   

    可以在服务器端实现修改
    需将<IFRAME>的RUANAT="SERVER"后只需要在服务器端代码中加入这句 iframe1.Attributes.Add("src", "http://website:8080/VF/index.htm"),就可以达到修改其SRC属性
      

  5.   

    找不到类型或命名空间名称“iframe1”(是否缺少 using 指令或程序集引用?)
      

  6.   

    MyIFrame.Attributes["src"] = Request["srcPage"];
      

  7.   

    <script>
    on()
    {
    document.all.right.src="b.aspx";
    }
    </script>