【问题标题】:reload parent window ie9 access denied重新加载父窗口ie9访问被拒绝
【发布时间】:2012-06-01 06:30:38
【问题描述】:

IE9 不允许我从 iframe 中重新加载父窗口。这是我的代码

  if(result != 0)
  {
     window.location.reload();
  }
  else
  {
     alert(alert_arr.fail_document_save);
  }
  return true;   

IE9 输出:SCRIPT70:权限被拒绝

有什么办法吗?

【问题讨论】:

    标签: window internet-explorer-9 parent reload


    【解决方案1】:
    if(result != 0)
      {
        var selfUrl = unescape(parent.window.location.pathname);
    
        parent.window.location.replace(selfUrl);
    
        parent.window.location.href = selfUrl;
      }
      else
      {
         alert(alert_arr.fail_document_save);
      }
      return true;
    

    根据this answer.

    【讨论】:

    • 不,同样的结果。权限被拒绝
    猜你喜欢
    • 2014-11-20
    • 2016-08-13
    • 2015-07-01
    • 1970-01-01
    • 2018-08-31
    • 1970-01-01
    • 2012-05-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多