实现功能:现在有上下两个Frame(name分别是上面为Head,下面为Main)的一个页面,在上面的frame中有一个文本框和按钮,希望在文本框里输入要打开的页面名称,点击按钮时在下面的Frame里面显示出来。哎,快被搞死了,帮帮忙阿!!!!

解决方案 »

  1.   

    here:
    如:head的文本为txt1,按钮为btn1
    则js:
    <input type=button id=btn1 click=aa();>
    function aa()
    {
      window.frames.main.href.location=document.all.txt1.value;
    }
      

  2.   

    用window.parent.Head.document.all.txt1.value 取出 要打开的页面名
    1.RegisterStartupScript("key", "<script>window.parent.main.location.replace('../treeview.aspx');</script>")
          
    2.Response.Write("<script language=javascript>window.parent.contents.location.href='../treeview.aspx'</script>")
      

  3.   

    to:tjj36(方舟) 我的开发平台是.net 2003,但是里面没有window.frames.main.href.location这个属性阿
      

  4.   

    to goody9807()
    你的方法也不行啊,window.parent.main.location.replace()好像也没有啊
      

  5.   

    .....这是javascript语句,直接写在aspx文件的html代码里,不是c#代码。window.frames.main.href.location的话不行可以试试top.Main.location.href=....
      

  6.   

    window.parent.frames["Main"].src="test.aspx"