<!DOCTYPE html>
<html>
  <head>
    <title>I Spy Game</title>
  </head>
  <body>
    <h1>I Spy Game</h1>
    <p>Welcome to the I Spy Game! Look around the room and try to find the item I'm thinking of.</p>
    <p>Hint: it's a small yellow object.</p>
    <input type="text" id="answer" />
    <button type="button" id="submit">Submit</button>
    <p id="result"></p>
    <script>
      document.getElementById('submit').addEventListener('click', function() {
        let answer = document.getElementById('answer').value;
        let result = document.getElementById('result');
        if (answer == 'banana') {
          result.innerHTML = 'You got it! Good job!';
        } else {
          result.innerHTML = 'Sorry, that's not it. Try again!';
        }
      });
    </script>
  </body>
</html>
I Spy Game - Find the Hidden Object!

原文地址: https://www.cveoy.top/t/topic/lnus 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录