index.html 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Bad Form, Peter</title>
  6. <style>
  7. body { font-family: mono; }
  8. form { margin: 0 auto; }
  9. form div { margin-bottom: 10px; }
  10. </style>
  11. </head>
  12. <body>
  13. <div style="display: none;">
  14. <p>Please mind the following:</p>
  15. <ul id="prompts"></ul>
  16. </div>
  17. <form id="lomake" method="post" action="./">
  18. <div>
  19. <label for="user">User: </label>
  20. <input type="text" id="user" name="user" value="" required />
  21. </div>
  22. <div>
  23. <label for="pass">Pass: </label>
  24. <input type="password" id="pass" name="pass" value="" required />
  25. </div>
  26. <div>
  27. <label for="submit">Please only submit the form once.</label>
  28. <br>
  29. <button type="submit" id="submit" name="button" value="thanks">Submit</button>
  30. </div>
  31. </form>
  32. <script src="main.js"></script>
  33. <script>
  34. window.onload = function () {
  35. var pan = new BadFormPeter();
  36. pan.onload("lomake", "submit", "prompts");
  37. };
  38. </script>
  39. </body>
  40. </html>