![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 577 Pomógł: 6 Dołączył: 21.07.2008 Ostrzeżenie: (0%) ![]() ![]() |
Witam,
mam taką pętle: [js] for(i=0;i<response.result.length;i++) { var div = document.createElement('div'); div.style.display = 'block'; div.innerHTML = '<table width="100%" cellspacing="1" cellpadding="0" border="0"><tr><td align="left" valign="middle" width="20">'+response.result[i].message+'</td></tr></table>'; document.getElementById('sb_Log').appendChild(div); } [/js] a chciałbym mieć tak: [js] var div = document.createElement('div'); div.style.display = 'block'; div.innerHTML = '<table width="100%" cellspacing="1" cellpadding="0" border="0">'; // Not ok for(i=0;i<response.result.length;i++) { div.innerHTML = '<tr><td align="left" valign="middle" width="20">'+response.result[i].message+'</td></tr>'; document.getElementById('sb_Log').appendChild(div); // Co z tym ? ? ? } div.innerHTML = '</table>'; // Not ok [/js] Jak to zrobić, aby działało prawidłowo, tworzyło div.innerHTML krok po kroku, wiersz za wierszem, a nie jak jest teraz całe tabele? Ten post edytował Malinaa 1.09.2010, 10:02:32 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 2 350 Pomógł: 512 Dołączył: 4.01.2009 Skąd: Wrocław / Świdnica Ostrzeżenie: (0%) ![]() ![]() |
Nie rozumiem... opisz dokładniej, pokaż kod i wynik jaki dostałeś i jaki chcesz dostać .
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 4.10.2025 - 14:26 |