相关疑难解决方法(0)

返回Firefox历史记录后,JavaScript将无法运行

当我使用Firefox上的后退按钮访问以前访问过的页面时,该页面上的脚本将不再运行.

第二次查看页面时是否有任何修复/解决方法让脚本再次执行?

请注意,我在Google Chrome和Internet Explorer上测试了相同的网页,并且它们按预期工作.


以下是我用来测试问题的文件和步骤:

(导航到0.html,点击进入1.html,后退按钮)

0.html

<html><body>
<script>
  window.onload = function() { alert('window.onload alert'); };
  alert('inline alert');
</script>
<a href="1.html">Click Me!</a>
</body></html>
Run Code Online (Sandbox Code Playgroud)

1.HTML

<html><body>
<p>Go BACK!</p>
</body></html>
Run Code Online (Sandbox Code Playgroud)

javascript firefox

78
推荐指数
3
解决办法
5万
查看次数

标签 统计

firefox ×1

javascript ×1