我想通了,謝謝。我需要將body移動到html。更改了正文部分中的一些標籤。如何搜索字符串中的字符並輸出字符出現的每個位置的索引? (Javascript)
}
else
{
window.alert ("You entered an invalid character (" + enterLetter + ") please re-enter");
secondPrompt();
}
}
</script>
<body onload = "firstPrompt();">
<h2>
Word Checker
</h2>
</body>
</html>
正是我在找的東西。非常感謝! – user1781453