a nie samo : <input type="text" name="odp(ilestam)" />
Próbowałem dodawac do funkcji document.write ale nic to nie daje...
Tu jest kod tej funkcji:
<script type="text/javascript"> window.onload = Laduj; function Laduj() { document.getElementById('add_input').onclick = DodajElement; } function DodajElement() { var element = document.createElement('input'); element.setAttribute('type', 'text'); var liczba = 0; var ilosc = document.forms['sonda'].elements.length; for (var i = 0; i < ilosc; i++ ) { if (document.forms['sonda'].elements[i].type == 'text') { liczba += 1; } } element.setAttribute('name', 'odp'+(liczba+1)); element.style.display = "block"; element.style.margin= "2px"; document.forms['sonda'].appendChild(element); } </script>
Z góry dzięki za pomoc
