Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [js] wyswietlanie tekstu
lucks
post
Post #1





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

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


mam tką funkcję która mi dodaje rózne pola do formularza

  1. function AddFile() {
  2. var diw = document.getElementById('diw');
  3. var file = document.createElement('input');
  4. var opis = document.createElement('input');
  5.  
  6. file.type="file";
  7. file.name='file_'+inums;
  8. opis.type="text"
  9. opis.name='opis_'+inums;
  10. inums++;
  11. document.getElementById("inums").value = inums;
  12. var br = document.createElement("br");
  13. diw.appendChild(br);
  14. diw.appendChild(file);
  15. diw.appendChild(opis);
  16. }


chodzi mi o to zeby wyswietlić jakiś tekst lub ustawić jakąś spacje by oddzielić elementy w kazdym wierszu przed polem tekstowym, np."Opis:" lub " "
kobinowałem z write i z innerhtml ale nie udało mi sie uzyskać zadowalającego efektu
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
Jim
post
Post #2





Grupa: Zarejestrowani
Postów: 111
Pomógł: 0
Dołączył: 27.07.2005

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


  1. text = document.createTextNode('Opis: ');
  2. diw.appendChild(br);
  3. diw.appendChild(file);
  4. diw.appendChild(text);
  5. diw.appendChild(opis);

polecam
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: 21.08.2025 - 14:52