Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [JavaScript]dynamiczne dodawania pol formularza
neo1986kk
post 7.02.2011, 22:37:23
Post #1





Grupa: Zarejestrowani
Postów: 561
Pomógł: 3
Dołączył: 2.02.2009

Ostrzeżenie: (0%)
-----


  1. var one = document.createElement('input');
  2. one.setAttribute("class", "purchaseItem");
  3. one.setAttribute("type", "text");
  4. one.setAttribute("name", "purchase[]");
  5.  
  6. var two = document.createElement('input');
  7. one.setAttribute("class", "purchaseItem");
  8. one.setAttribute("type", "text");
  9. one.setAttribute("name", "volume[]");
  10.  
  11. var three = document.createElement('input');
  12. one.setAttribute("class", "purchaseItem");
  13. one.setAttribute("type", "text");
  14. one.setAttribute("name", "price[]");
  15.  
  16.  
  17. p2=document.getElementById('purchaseContainer');
  18. p2.appendChild(one);
  19. p2.appendChild(two);
  20. p2.appendChild(three);


wyskakuje cos takiego"

  1. <input class="purchaseItem" type="text" name="price[]"/>
  2. <input/>
  3. <input/>


dobra juz wiem, sorry, ale dopóki tutaj tego nie wkleiłem nie dopatrzyłem się...

Ten post edytował neo1986kk 7.02.2011, 22:38:50
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 13.07.2025 - 01:51