Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Onclick
Radi_
post
Post #1





Grupa: Zarejestrowani
Postów: 23
Pomógł: 0
Dołączył: 21.02.2006

Ostrzeżenie: (10%)
X----


W HTML 4.0 działa ale czy ktoś wiek jak to ugryźć żeby zadziałało w XHTML ?

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  4. <title>Untitled Document</title>
  5.  
  6. <script type="text/javascript">
  7.  
  8. function doSection (secNum){
  9. if (secNum.style.display=="none"){secNum.style.display=""}
  10. else{secNum.style.display="none"}
  11. }
  12.  
  13. function noSection (secNum){
  14. if (secNum.style.display==""){secNum.style.display="none"}
  15. }
  16.  
  17.  
  18. </head>
  19.  
  20. <p><a onclick="doSection(identyfikator1)" class="anchorclass" href="#nowhere">Open / Close</a></p>
  21. <p></p><div class="ramka1" id="identyfikator1" style="display: none" onclick="noSection(identyfikator1)">
  22. <p>Cos tam...</p>
  23. <img src="images/kitty.gif" width="100" height="150" />
  24. </div>
  25. </body>
  26. </html>
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: 22.08.2025 - 12:36