Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] zmiana diva
escobar1983
post
Post #1





Grupa: Zarejestrowani
Postów: 198
Pomógł: 0
Dołączył: 31.01.2008

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


Witam , problem polega na tym ze chcialbym zrobic sobie liste np.
  1. <?php
  2. <ul >
  3. <li><a name="a">1</a></li>
  4. <li><a name="a">2</a></li>
  5.  
  6. </ul>
  7. ?>
I teraz po nacisnieciu ktoregos z linkow pokazaly mi sie info na temat tego linku pod ta lista.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Cezar708
post
Post #2





Grupa: Zarejestrowani
Postów: 1 116
Pomógł: 119
Dołączył: 10.05.2005
Skąd: Poznań

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


na przykład:

  1. function showInfo(id){
  2. document.getElementById(id).style.display = 'block';
  3. }
  4. <ul >
  5. <li><a name="a" onclick="showInfo('l1')">1</a>
  6. <div id="l1" style="display: none;">
  7. info o linku 1
  8. </div>
  9. </li>
  10. <li><a name="a" onclick="showInfo('l2')" style="display: none;">2</a>
  11. <div id="l2">
  12. info o linku 2
  13. </div>
  14. </li>
  15.  
  16. </ul>


~EDIT
zapomniałe o style="display: none;" pozdrawiam (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Ten post edytował Cezar708 18.03.2008, 16:22:59
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 12.10.2025 - 06:36