Guest User

Untitled

a guest
Aug 6th, 2026
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1.  
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Tarot Card Reading</title>
  8. </head>
  9. <body>
  10. <h1>Tarot Card Reading</h1>
  11. <img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ffermentationwineblog.com%2Fwp-content%2Fuploads%2Fpredictions.jpg&f=1&nofb=1&ipt=41e54d29f1b274ad1f3fc844ebefed5d8ecc7b4d6dd132d41e82dafd4e1e6c06" alt = "A cartoon of a man looking into a crystal ball labeled, 'The Future.'" height=250 width=250>
  12. <br>
  13. <br>
  14.  
  15. <h3>Enter a number that speaks to you today:</h3>
  16. <input id = "entered-number" type = "number">
  17. <br>
  18. <br>
  19. <button type="button" onclick = "enterNumber()">Take a card</button>
  20. <br>
  21. <br>
  22.  
  23. <p id="outputFortune"></p>
  24. <script>
  25. function enterNumber() {
  26. let chosenNumber = document.getElementById("entered-number").value;
  27.  
  28. const fortune1 = "The Sun";
  29. const fortune2 = "The Hanged Man";
  30. const fortune3 = "The Tower";
  31. const fortune4 = "Judgement";
  32. const fortune5 = "The Fool";
  33. const fortune6 = "The Lovers";
  34. const fortune7 = "The Moon";
  35. const fortune8 = "The Hermit";
  36. const fortune9 = "The High Priestess";
  37. const fortune10 = "The Emperor";
  38. const fortune11 = "The Chariot";
  39. const fortune12 = "Strength";
  40. const fortune13 = "Wheel of Fortune";
  41. const fortune14 = "The Star";
  42. const fortune15 = "Temperance";
  43. const fortune16 = "The World";
  44. const fortune17 = "Justice";
  45. const fortune18 = "The Empress";
  46. const fortune19 = "The Hierophant";
  47. const fortune20 = "The Devil";
  48. const fortune21 = "The Magician";
  49. const fortune22 = "The Fool";
  50.  
  51.  
  52.  
  53. let selectedFortune;
  54.  
  55. if (chosenNumber >= 98838172) {selectedFortune = fortune1
  56. } else if (chosenNumber >= 8838190) {let selectedFortune = fortune2
  57. } else if (chosenNumber >= 8875172) {let selectedFortune = fortune3
  58. } else if (chosenNumber >= 90172) {let selectedFortune = fortune4
  59. } else if (chosenNumber >= 50000) {let selectedFortune = fortune5
  60. } else {let selectedFortune = fortune6;}
  61.  
  62. document.getElementById("outputFortune").innerHTML =
  63. `You have turned over ${selectedFortune}.`;
  64. };
  65.  
  66. </script>
  67. </body>
  68. </html>
Advertisement
Add Comment
Please, Sign In to add comment