moze mnie ktos oswieci dlaczego ten skrypcik dziala w szajsplorerze a mozilla go nie trwai
nie mam w tej chwili linka do stronki bo jest ona w przerobce i chcialem zeby bylo jush dobrze wszedzie.... a stronak ba byc "best view in mozilla"
<script>
<!--
/*
Count up from any date script-
By Website Abstraction (www.wsabstract.com)
Over 200+ free scripts here!
*/
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countup(yr,m,d){
var today=new Date()
var todayy=today.getYear()
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
difference+=" dni"
document.write("Sieć FirePunch istnieje jush "+difference+"!")
}
//enter the count up date using the format year/month/day
countup(2000,07,01)
//-->
</script>
twoja strona istnieje od...
Moderator: Pomocy?!
Posty: 4
• Strona 1 z 1
Re: twoja strona istnieje od...
Przeglądarka: -
Bucz pisze:moze mnie ktos oswieci dlaczego ten skrypcik dziala w szajsplorerze a mozilla go nie trwai
nie mam w tej chwili linka do stronki bo jest ona w przerobce i chcialem zeby bylo jush dobrze wszedzie.... a stronak ba byc "best view in mozilla"
<script>
<!--
/*
Count up from any date script-
By Website Abstraction (www.wsabstract.com)
Over 200+ free scripts here!
*/
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countup(yr,m,d){
var today=new Date()
var todayy=today.getYear()
getYear zmien na -> getFullYear i bedzie dobrze - tez mialem ten sam problem
Państwowa dziwka, flądra w jedwabiu i złocie. || Chcą za nią tren nieść, duszę włócząc w błocie. || Cyril Tourneur (1575-1625) ||
SeaMonkey @ GNU/Linux
SeaMonkey @ GNU/Linux
- KLAPEK
- Moderator
- Posty: 2190
- Z nami od: 10 czerwca 2002, 15:05
- Lokalizacja: ~/seamonkey
Re: twoja strona istnieje od...
Przeglądarka: -
Bucz pisze:var today=new Date()
var todayy=today.getYear()
var todaym=today.getMonth()
var todayd=today.getDate()
http://developer.netscape.com/docs/manu ... tm#1010352
- GmbH
- Posty: 825
- Z nami od: 30 stycznia 2002, 22:38
Przeglądarka: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; SV1)
cześć!
ten kod wylicza ile minęło lat i dni od pewnej daty, ale co 4 lata dodaje 1 dzień przystępny, co zrobić żeby go nie dodawał?!?
<SCRIPT>
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countup(yr,m,d){
var today=new Date()
var todayy=today.getFullYear()
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
difference+=" dni"
document.write(""+difference+" ")
}
function countupyear(yr,m,d){
var today=new Date()
var todayy=today.getYear()
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
var przy=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)/4/366
if(difference>365)
{
var rok=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000*365))*1)
var dzien=((Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1))-(rok*365)
if(dzien<0){
dzien+=365
rok-=1
}
if(rok==1){
rok+=" rok"
}else if((rok>1) && (rok<5)){
rok+=" lata"
}
if(dzien==1){
dzien+=""
}
if(dzien>1){
dzien+=""
}
if(rok>4){
rok+=" lat"
}
document.write(""+rok+" "+dzien+" dni")
}
if(difference<365){
if(difference==1){
difference+=""
}
if(dzien>1){
difference+=""
}
document.write(""+difference+" dni")
}
}
</SCRIPT>
<SCRIPT>countupyear(1944,05,14)</SCRIPT>
ten kod wylicza ile minęło lat i dni od pewnej daty, ale co 4 lata dodaje 1 dzień przystępny, co zrobić żeby go nie dodawał?!?
<SCRIPT>
var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countup(yr,m,d){
var today=new Date()
var todayy=today.getFullYear()
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
difference+=" dni"
document.write(""+difference+" ")
}
function countupyear(yr,m,d){
var today=new Date()
var todayy=today.getYear()
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
var przy=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)/4/366
if(difference>365)
{
var rok=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000*365))*1)
var dzien=((Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1))-(rok*365)
if(dzien<0){
dzien+=365
rok-=1
}
if(rok==1){
rok+=" rok"
}else if((rok>1) && (rok<5)){
rok+=" lata"
}
if(dzien==1){
dzien+=""
}
if(dzien>1){
dzien+=""
}
if(rok>4){
rok+=" lat"
}
document.write(""+rok+" "+dzien+" dni")
}
if(difference<365){
if(difference==1){
difference+=""
}
if(dzien>1){
difference+=""
}
document.write(""+difference+" dni")
}
}
</SCRIPT>
<SCRIPT>countupyear(1944,05,14)</SCRIPT>
- Zelgadiz
Posty: 4
• Strona 1 z 1
Wróć do Standardy WWW i źle działające strony
Kto jest online
Zarejestrowani użytkownicy: Baidu [Spider], Bing [Bot], dexter, Google [Bot]