为什么 document.write() 在 Firefox 和 chrome 中表现不同? [英] Why document.write() behaves differently in Firefox and chrome?
本文介绍了为什么 document.write() 在 Firefox 和 chrome 中表现不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在制作一个简单的重定向脚本,它将在 5 秒后将用户重定向到 2.html
.
当我在 Chrome 上测试脚本时,它可以工作!但在最新的 Firefox 中,它不会减少秒数并挂起.
我是初学者,已经尽我所能,但我无法解决这个问题,我在网上查看但无法找到解决方案.我该如何解决这个问题?
我的代码:
index.html:
<头><title>我的第一页</title><script type="text/javascript" src="script.js"></script>头部><身体><input type="button" value=" YES " onclick="yes()"/>