有人可以解釋爲什麼這個簡單的代碼可以在基於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
哦,很高興聽到這一點。 ')' –