<!DOCTYPE html>
<html>
  <head>
    <title>I Spy</title>
  </head>
  <body>
    <h1>I Spy!</h1>
    <p>Can you find the hidden object?</p>
    <img src='images/hiddenscene.jpg' alt='Hidden Scene' width='400' height='300'>
    <form>
      <label>What do you see?</label>
      <input type='text' name='guess'>
      <input type='submit' value='Guess'>
    </form>
    <script>
      const guess = document.querySelector("input[type='text']").value;
      if (guess === 'butterfly') {
        alert('You got it! Congratulations!');
      } else {
        alert('Sorry, that's not it. Try again!');
      }
    </script>
  </body>
</html>
Play I Spy Game: Find The Hidden Object Online

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

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