Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- <!--
- function add_input(){ // Input erstellen
- var wo = document.getElementById('wo');
- var li = document.createElement('li');
- var input = document.createElement('input');
- input.type = 'text';
- input.name = 'antwort[]';
- li.appendChild(input);
- li.appendChild(document.createTextNode(' '));
- var button=document.createElement('input');
- button.type = 'button';
- button.className = 'button small';
- button.onclick=function(){delete_input(this);};
- button.value = 'loeschen';
- li.appendChild(button);
- wo.appendChild(li);
- }
- function delete_input(feld){ // Input loeschen
- feld.parentNode.parentNode.removeChild(feld.parentNode);
- }
- //-->
- </script>
Add Comment
Please, Sign In to add comment