Multiupload..Forum » Tutorials » Help » Multiupload..
-
30.05.2012 um 23:52 Uhr
Hey,
unten ist das Multiupload Script aus der Tutorial Section.
Meine Frage ist, wie kann ich die anzahl an input feldern begrenzen?
<!-- function add_input(){ // Input Feld erstellen var wo = document.getElementById('wo'); var li = document.createElement('li'); var input = document.createElement('input'); input.type = 'file'; input.name = 'datei[]'; 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 Feld loeschen feld.parentNode.parentNode.removeChild(feld.parentNode); } //--> </script>
Gre
Der Beitrag wurde insgesamt 5 mal editiert, zuletzt 31.05.2012 um 12:18 Uhr ...
[ 1 ]
Seite 1 von 1