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
 
Start new topic
Odpowiedzi
mariuszn3
post
Post #2





Grupa: Zarejestrowani
Postów: 352
Pomógł: 0
Dołączył: 22.01.2006

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


Masz tu jeden podstawowy błąd. XHTML 1.1 nie może być text/html
Go to the top of the page
+Quote Post
mike
post
Post #3





Grupa: Przyjaciele php.pl
Postów: 7 494
Pomógł: 302
Dołączył: 31.03.2004

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


Cytat(mariuszn3 @ 28.08.2006, 13:31 ) *
Masz tu jeden podstawowy błąd. XHTML 1.1 nie może być text/html
Nieprawda!

XHTML Media Types
Cytat
This document summarizes the best current practice for using various Internet media types for serving various XHTML Family documents. In summary, 'application/xhtml+xml' SHOULD be used for XHTML Family documents, and the use of 'text/html' SHOULD be limited to HTML-compatible XHTML 1.0 documents. 'application/xml' and 'text/xml' MAY also be used, but whenever appropriate, 'application/xhtml+xml' SHOULD be used rather than those generic XML media types.


should != must
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: 14.10.2025 - 17:53