-6
如剛:爲什麼寫簡單的代碼的HTML Chrome上無法正常工作
<!doctype html>
<html>
<head>
<title>Example of confirm()</title>
<script>
if (confirm("Want to go to Disneyland?"))
document.location.href
=「http://park.hongkongdisneyland.com」;
</script> //says this wont work, because of the /<
</head> //says this wont work, because of the /<
</html> //says this wont work, because of the /<
VM43:1未捕獲的SyntaxError:意外的標記<
該代碼正確。可能錯誤在別的地方。 – ema
這個問題很難解釋,但我假設你的HTML無效。如果您需要任何有用的反饋,請發佈您的HTML代碼。 –
也使用「代碼塊」來發布代碼,否則它真的不可讀。 – ofca