Firefox +一些JavaScript =標籤,帶有永不完成加載的無限旋轉輪(Chrome可以!)。爲什麼?
function clickMe() {
document.write("You clicked on the Button!");
}
<html>
<body>
<script src="script.js"></script>
<input type="button" value="Button" onclick="clickMe()" />
</body>
</html>
這裏按下按鈕,使Firefox標籤裝入輪永遠旋轉。這是爲什麼?
代碼中是否有任何錯誤或者這可能是Firefox的一些問題?
非常感謝!
你應該**永遠**不要**使用'document.write',並且以其他方式做它可能解決這個問題。 – adeneo
爲什麼你總是使用'document.write'? – woody1990
我只是不知道我應該從來沒有使用它。感謝您的評論! –