Created
October 22, 2015 15:19
-
-
Save d30jeff/508e4baf4cadca6c81f4 to your computer and use it in GitHub Desktop.
Click to add text field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| <script src="https://code.jquery.com/jquery-2.1.4.js"></script> | |
| <script> | |
| $(function() { | |
| $("#clickMe").on('click', function() { | |
| var menu = "<label>Name</label><input type='text' name='name[]'>"; | |
| $(menu).appendTo("#myForm"); | |
| }); | |
| }); | |
| </script> | |
| </head> | |
| <body> | |
| <button id="clickMe">Click me to add column</button> | |
| <form id="myForm"> | |
| </form> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment