![]() |
![]() |
![]() ![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 189 Pomógł: 1 Dołączył: 28.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
Jak w JawieScript DOM dodać np element tr na samej górze tabelki.
|
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 189 Pomógł: 1 Dołączył: 28.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
Gdy uprościłem skrypt do takiej postaci:
Kod <html> <head> <title>Tabelka test</title> </head> <script type="text/javascript"> function addElement() { var table = document.getElementById('tabelka'); var selecttr = document.createElement("tr");//tr na górze tabelki table.insertBefore(selecttr, table.getElementsByTagName("tr")[0]); } </script> <body onload="addElement()"> <table id="tabelka"> <tr> <td>Test</td> </tr> </table> </body> </html> Ten błąd występuje dalej. Więc ta wina nie jest wywołana jakimiś błędami w reszcie skryptu. |
|
|
![]() ![]() |
![]() |
Aktualny czas: 11.10.2025 - 08:22 |