Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript]Nie wiem gdzie mam błąd.
matiszon
post
Post #1





Grupa: Zarejestrowani
Postów: 95
Pomógł: 1
Dołączył: 22.09.2009

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


Witam. Mam taki kod i nie wiem dla czego mi on nie działa.

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <title>Costam</title>
  3. <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
  4. <script LANGUAGE="JavaScript">
  5. var xmlHttp;
  6. xmlHttp=new XMLHttpRequest();
  7.  
  8. xmlHttp.onreadystatechange= ret;
  9. xmlHttp.open("GET", "http://forum.php.pl/", true);
  10. xmlHttp.send(null);
  11.  
  12. function ret() {
  13. if (xmlHttp.readyState == 4) {
  14. document.getElementById("asdex").innerHTML=xmlHttp.responseText;
  15. }
  16. }
  17. </head>
  18. <div id="asdex">
  19.  
  20. </div>
  21. </body></html>


Mam to zapisane jako plik .html na komputerze. Uruchamiam w firefoxie.

Ten post edytował matiszon 25.10.2010, 19:42:51
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 Aktualny czas: 21.08.2025 - 01:47