有人可以解释为什么这个简单的代码可以在基于webkit的浏览器(甚至是我的android手机)中工作,但不能在Firefox上使用? (代码基本上刷新iframe中每1000毫秒(bash脚本回声到该文件))Settimeout适用于基于Chrome /浏览器的浏览器,但不适用于Firefox浏览器
此代码的网站是http://haenh.ddns.us/ui/content/servinfo,它是在嵌入:http://haenh.ddns.us/ui/?page_id=2(Firefox中的第一个环节我必须手动刷新而第二个链接显示纺纱绿色圆圈(表示它正在下载的内容)。在Chrome/WebKit的,这是令人耳目一新如预期)
<html>
<head>
<script>
function a(){
document.close();
document.write('<br><p align="center"><iframe src="/serv.txt" width="700" height="2000" scrolling="no" frameborder="0"<> <p>Failed</p> </iframe></p><br><br>');
setTimeout('a()', 1000);
// the old one was 15000
}
</script>
</head>
<body onLoad="a()">
<title>ServInfo</title>
<br>
JS is required.
</body>
</html>
旁注解决了这个问题:D – user1950278
哦,很高兴听到这一点。 ')' –