Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Niedziałający skrypt
Mixter78
post 19.10.2014, 19:18:57
Post #1





Grupa: Zarejestrowani
Postów: 34
Pomógł: 0
Dołączył: 17.10.2013

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


  1. <!DOCTYPE html>
  2. <html lang="pl" oncontextmenu="return false">
  3. <title>test</title>
  4. <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  5. <link rel="stylesheet" href="styles.css" type="text/css" media="all">
  6. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
  7. <link href="http://fonts.googleapis.com/css?family=Berkshire+Swash&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  8. <link href="http://fonts.googleapis.com/css?family=Advent+Pro&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  9. <link href="http://fonts.googleapis.com/css?family=News+Cycle&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  10. </head>
  11. <script type="text/javascript">
  12. setInterval("moja_funkcja();",1000);
  13. function moja_funkcja(){
  14. $(\'#odswiez_1\').load(location.href + \' #odswiez_2\');
  15. }
  16. </script>
  17. <div class="hp_pos" style="font-size:18px;">
  18. <div class="top_info" style="margin: 0 auto;">
  19. <div id="odswiez_1">
  20. <div id="odswiez_2">
  21. <div class="bbb"><?php echo date('H:i:s'); ?></div>
  22. </div>
  23. </div>
  24. </div>
  25. </div>
  26. </body>
  27. </html>


Ktoś może wie, dlaczego mi to nie działa? :/
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
Pyton_000
post 19.10.2014, 20:38:45
Post #2





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

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


Nie.
Go to the top of the page
+Quote Post
Szymciosek
post 19.10.2014, 23:59:58
Post #3





Grupa: Zarejestrowani
Postów: 1 168
Pomógł: 126
Dołączył: 5.02.2010
Skąd: Świdnica

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


setInterval(moja_funkcja(),1000);
function moja_funkcja(){
alert('asd');
}



Poczytaj trochę https://developer.mozilla.org/en-US/docs/We...ers.setInterval
Go to the top of the page
+Quote Post
koryx
post 26.10.2014, 00:42:32
Post #4





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 15.11.2013

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


Kod
$(\'#odswiez_1\').load(location.href + \' #odswiez_2\');

nie powinno byc czasem:
Kod
$('#odswiez_1').load(location.href + '#odswiez_2');
?
Go to the top of the page
+Quote Post

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: 14.08.2025 - 05:41