Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html> <html> <head> <script>
- window.onload = init;
- var clicks = 0;
- function init()
- {
- document.getElementById("go").onclick = add_textarea;
- }
- function add_textarea()
- {
- clicks++;
- var textarea = '';
- for(var i=0;i<clicks;i++)
- {
- textarea += '<textarea cols="5" rows="5"></textarea><br>';
- }
- document.getElementById("pola").innerHTML = textarea;
- }
- </script> </head>
- <body>
- <form action="#"> <input type="submit" value="Dodaj pole" id="go"/> </form>
- <div id="pola"></div>
- </body> </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement