我用 showModalDialog() 打开子窗体   用Response.write("<script>window.opener.loaction.reload();window.close()</script>");
IE8 得不到效果   请教各位大侠指导   网上说IE8不支持 opener对象  如果是的话我用什么办法?

解决方案 »

  1.   

    showModalDialog打开不能使用opener/
      

  2.   

    window.showModalDialog('WebForm2.aspx',window)在WebForm2.aspx里使用
    var a = window.dialogArguments 
    a.location.reload()刷新
      

  3.   

    为了安全起见,请使用frameset嵌套一层。
    参见
    http://dotnet.aspx.cc/article/00000000-0000-0000-0000-00000000000f/read.aspx
      

  4.   

    我要关闭后刷新父窗体?
    window.showModalDialog('WebForm2.aspx') 
    window.location.reload()就可以
      

  5.   

    你需要了解window.showModalDialog 的语法。搜索window.showModalDialog 详解
      

  6.   

    错误: 'a.location' 为空或不是对象
    还是不行
      

  7.   


    所以你需要嵌套一层frameset啊。
    使用frameset后采用下面的方法
    var a = parent.window.dialogArguments
    a.location.reload()刷新
      

  8.   

    哦 发现了 是用window.close() 又弹出来了一个窗体  不知道为什么 ~ 晕啦~
      

  9.   

    好好看看文章。嵌套的方法
    parent.close()
    前面无需写a.location.reload()了代码提供了2种方法实现。一个是在里面刷新,一个是在外面刷新
      

  10.   

    <base target=_self />