dqm83011 2012-07-03 08:17
浏览 45
已采纳

在safari和Internet Explorer中重新加载无限循环

I have this code which helps me to reload a page. The issue is, it works with Chrome and Firefox but not with Safari, it loops continually.

Can you help me why is this happening?

This is the code:

top.location.href=\'http://www.facebook.com/pages/Penelope-NS/327068327378161?sk=app_338788849530374\';

Can i do this otherwise?

Thanks

I found this code: Where am i supposed to insert it?

headers 'Content-Type' => "text/html;charset=utf-8",
  'Last-Modified' => Time.now.httpdate,
  'P3P' => 'CP="CAO PSA OUR"',
  'X-UA-Compatible' => 'IE=edge'
  • 写回答

2条回答 默认 最新

  • duancan2539 2012-07-03 08:23
    关注

    Try to use window.top.location = "NEW_URL" for the IE. Or, if your code is run from iframe, parent.location = "NEW_URL"

    Maybe same problem

    Update:

    To address the same page where the script itself resides: self.location.href = newURL;

    To address another page in a frameset: window.top.frameName.location.href = newURL;

    or (hypercorrect):

    window.top.frames['frameName'].location.href = newURL;

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置