Advertisement
atanasovetr

Untitled

Apr 13th, 2022
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Document</title>
  8. </head>
  9. <body>
  10. <form action="">
  11. <input type="text" name="firstName">
  12. <input type="text" name="lastName">
  13. <input type="email" name="email">
  14. <input type="text" name="telNum">
  15. <button type="submit">Покажи</button>
  16. </form>
  17. <p name="result"></p>
  18. <script>
  19. let form = document.querySelector("form");
  20. console.log(form);
  21. let result = document.querySelector('result');
  22. form.addEventListener("submit", function(){
  23. console.log(form);
  24. })
  25. </script>
  26.  
  27. </body>
  28. </html>
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement