-3
以下是我的HTML代码。我尝试了一切,但我无法使这个功能正常工作。提前致谢。为什么我的简单功能不起作用?
<html>
<head>
<title>How many fingers?</title>
</head>
<body>
<p>Guess how many fingers I am holding up </p>
<!-- <input type="text" id="fingers"> -->
<p><input type="text" id="guess"><button id="checkGuess">Guess</button></p>
<script type="text/javascript">
document.getElementById("checkGuess").onlick = function() {
alert("hi!");
}
</script>
</body>
</html>
纠错:工作* – Akash21