![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 44 Pomógł: 0 Dołączył: 30.06.2009 Ostrzeżenie: (10%) ![]() ![]() |
mam taki skrypt
CODE function fileFields() { var x = document.getElementById('dodajimput'); x.onclick = function() { var i = parseFloat(this.lastChild.id)+1; input = document.createElement("input"); input.setAttribute("type", "text"); input.setAttribute("name", 'pole_' + i); input.setAttribute("id", i); this.appendChild(input); } } function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } } addLoadEvent(function() { fileFields(); }); oraz CODE <a href="#" id="dodajimput">Dodaj</a> <input type="text" name="pole_1" id="1" /> Gdy wciskam dodaj Ma dodawać 1 pole i to jest dobrze ale gdy wpisze coś w tym polu to też się dodaje 1 pole. chce aby tylko jak wcisnę to się dodawało a nie jak wpisze coś . Ten post edytował raxon 22.07.2010, 19:01:16 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 22.08.2025 - 13:08 |