Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Skrypt odliczania
DenVer89
post 14.09.2007, 22:32:06
Post #1





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

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


Witam mam taki skrypt odliczania na tej stronie: www.odliczanie.strefax.pl
a tutaj w3c:
http://validator.w3.org/check?uri=http%3A%...r.strefax.pl%2F
są błędy jak się ich pozbyć questionmark.gif
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 7)
RaNdaLLHD
post 16.09.2007, 11:56:32
Post #2





Grupa: Zarejestrowani
Postów: 44
Pomógł: 0
Dołączył: 21.06.2007

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


Błąd 1: Atrybut align nie może mieć wartości absmiddle.
Błąd 2: Brak atrybutu alt.
Błąd 3 i 4: Usuń LANGUAGE="JavaScript" i dodaj zamiast niego: type="text/javascript".


--------------------
. . .
Go to the top of the page
+Quote Post
DenVer89
post 16.09.2007, 12:11:36
Post #3





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

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


sorrka pomyliłem kod w3c poprawny z dresem to:
http://validator.w3.org/check?uri=http%3A%...ine&group=0
Go to the top of the page
+Quote Post
RaNdaLLHD
post 16.09.2007, 12:23:11
Post #4





Grupa: Zarejestrowani
Postów: 44
Pomógł: 0
Dołączył: 21.06.2007

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


  1. <script type="text/javascript">
  2. <!-- <![CDATA[
  3.  
  4. ... (Treść Twojego skryptu) ...
  5.  
  6. // ]]> -->


Ten post edytował RaNdaLLHD 16.09.2007, 12:23:45


--------------------
. . .
Go to the top of the page
+Quote Post
Moli
post 16.09.2007, 13:38:59
Post #5





Grupa: Zarejestrowani
Postów: 662
Pomógł: 45
Dołączył: 26.03.2007
Skąd: Warszawa

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


A nie lepiej Ci to w php stworzyć ?
Go to the top of the page
+Quote Post
DenVer89
post 16.09.2007, 14:10:14
Post #6





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

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


  1. <?php
  2. echo "<script type=\"text/javascript\">
  3. <!-- <![CDATA[
  4. var before=\"DO WAKACJI\"
  5. var current=\"Moje imieniny. Proszę o życzenia!\"
  6. var montharray=new Array(\"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec\")
  7.  
  8. function countdown(d,m,yr)
  9.  {
  10. var today=new Date()
  11. var todayy=today.getFullYear()
  12. var todaym=today.getMonth()
  13. var todayd=today.getDate()
  14. var todaystring=montharray[todaym]+" "+todayd+\"\"+todayy
  15. var futurestring=montharray[m-1]+\" \"+d+\"\"+yr
  16. var futurestring_po=montharray[m-1]+\" \"+d+\"\"+yr
  17. var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1)
  18. var difference_po=(Math.round((Date.parse(todaystring)-Date.parse(futurestring_po))/(24*60*60*1000))*1)
  19.  
  20. if (difference==0)
  21.  document.write(0)
  22.  
  23. else if (difference>0)
  24.  document.write(\"\"+difference+\"\")
  25.  
  26. else if (difference<0 && difference_po<0)
  27.  document.write(\"0\")
  28.  
  29. else if (difference_po>0)
  30.  document.write(\"To już historia\")
  31.  }
  32.  
  33. countdown(17,09,2007)
  34. ]]> -->
  35. </script><br />";
  36. ?>
mam kod js który musze dać w php w echo ""; jednak są błędy poprawi mi ktoś aby go poprawnie wyświetlano

Cytat(Moli @ 16.09.2007, 14:38:59 ) *
A nie lepiej Ci to w php stworzyć ?

w php jak questionmark.gif ale musiał by tak samo liczyc jak mój winksmiley.jpg
Go to the top of the page
+Quote Post
Moli
post 16.09.2007, 14:42:47
Post #7





Grupa: Zarejestrowani
Postów: 662
Pomógł: 45
Dołączył: 26.03.2007
Skąd: Warszawa

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


Funkcja date() lub time() i czysta matematyka smile.gif
Go to the top of the page
+Quote Post
DenVer89
post 16.09.2007, 14:48:57
Post #8





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

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


no to pochwal się jak dla ciebie t czysta matematyka to czyli proste dla mnie nie:
http://forum.php.pl/index.php?showtopic=77316
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: 18.07.2025 - 00:49