Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> zmiana tr, nie mam innego pomyslu na temat
Dex1987
post 14.08.2006, 23:56:44
Post #1





Grupa: Zarejestrowani
Postów: 246
Pomógł: 0
Dołączył: 28.09.2004

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


Witam mam taki kodzik:

  1. <script language="JavaScript" type="text/javascript">
  2.  
  3. function change (name) {
  4.  
  5. document.getElementById (name).innerHTML = '<font face="verdana" size="2">OK</font>';
  6.  
  7. name = document.getElementById (name).innerHTML
  8. }
  9.  
  10.  
  11. <table border="1" widht="100%">
  12. <tr onClick="change ('foo1')">
  13. <td width="100%">
  14. <div id="foo1">
  15. tekst 1
  16. </div>
  17. </td>
  18. </tr>
  19. <tr onClick="change ('foo2')">
  20. <td width="100%">
  21. <div id="foo2">
  22. tekst 2
  23. </div>
  24. </td>
  25. </tr>


Dzila on tak: mam x komorek, kaza ma jakas wartosc... teraz jak klikne na jakas zmienia sie na OK, ale gdy klikne na inna to chcialbym zeby poprzednia wracal do poczatkowej formy.
Go to the top of the page
+Quote Post

Posty w temacie


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: 29.06.2025 - 19:13