Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.50 KB | None | 0 0
  1. <body>
  2.     <form id="host">
  3.         <!-- Click this button to add emails to form -->
  4.         <button id="btn">Add email</button>
  5.     </form>
  6.     <script>
  7.         // add emails to form
  8.         function add() {
  9.             var email = document.createElement("input");
  10.             email.type = "email";
  11.             email.name = "email";
  12.             document.getElementById("host").appendChild(email);
  13.         }
  14.         document.getElementById("btn").addEventListener("click", add);
  15.     </script>
  16. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement