看了论坛中介绍的方法,如:
window.top.opener   =   null;   
  window.top.close();   
等,都不行,结果始终是在当前的框架中打开另一个页面,而我的想法是关闭当前整个框架,而在窗口中进入另一个页面。我用的是vs2005,vista系统,请问如何实现?

解决方案 »

  1.   

    window.open("新窗口");
    window.top.close();
      

  2.   

    你是使用的 iframe吗?
    top.location.href="http://www.XXXX.COM";
    parent.location.href="http://www.XXXX.COM";
      

  3.   


    page.ClientScript.RegisterStartup(this.GetType(),"","<script language='javascript'>parent.location.href='跳转的地址'</script>");
      

  4.   


    page.ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.ToString(), "alert('对不起,您还没有登录,请先登录!');parent.window.location.href('../../Login.aspx');", true);
      

  5.   

    window.open(url);
    window.showModalDialg();
    opener.window=null;
    winwo.top.close();
      

  6.   

    在代码中通过iframe生成的框架,分左右分部分,退出的按钮在左边框架中,结果用代码吸是左边的的框架有反应,右边框架没有反应
      

  7.   

    6楼的和你的一样,所以我基本上不用iframe了,模板一样的效果啊~,没有想到怎么解决楼主的问题~
      

  8.   

    IFrame页面代码拿出来看看!~~
      

  9.   

    iframe是浮动帧,不叫框架。。
    iframe就不要用.top了,在子页面.parent得到整个父窗口
      

  10.   

    我用的iframe用这种方法确实能解决!
      

  11.   

    用的是iframe吧,你在子页面里添加个按钮做个超级链接就行了
    <A href="**.aspx" target="_parent" >退出</A>  
      

  12.   

    http://topic.csdn.net/u/20100120/19/9ac90bc2-0a78-462d-86d4-1fe8caed04e2.html