Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [js] dynamiczne dodawanie wierszy
lucks
post
Post #1





Grupa: Zarejestrowani
Postów: 143
Pomógł: 0
Dołączył: 5.04.2005

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


  1. function AddField(inums) {
  2. var prod_table = document.getElementById('prod_table');
  3. var f_opis = document.createElement('input');
  4.  
  5. f_opis.type="text";
  6. f_opis.size="65";
  7. f_opis.name='opis_'+inums;
  8.  
  9. var tr = document.createElement('tr');
  10. prod_table.appendChild(tr);
  11. var td = document.createElement('td');
  12. tr.appendChild(td);
  13. td.appendChild(f_typ);
  14. }

pola input sie dodają, ale co z elemantami tabeli? nie trzeba ich domykac? ogolnie dostaje jakis element td ale dwóch juz nie, tr tez nie mogę odszuakć
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 Aktualny czas: 20.08.2025 - 23:24