Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body>
- <form id="host">
- <!-- Click this button to add emails to form -->
- <button id="btn">Add email</button>
- </form>
- <script>
- // add emails to form
- function add() {
- var email = document.createElement("input");
- email.type = "email";
- email.name = "email";
- document.getElementById("host").appendChild(email);
- }
- document.getElementById("btn").addEventListener("click", add);
- </script>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement