ANA SAYFA | FORUM | SİTENİZ İÇİN | İÇERİK EKLE | EN YENİLER | EN POPÜLERLER | EN BEĞENİLENLER | REKLAM | İLETİŞİM
Arama:
Tüm kategorilerde Google JAVAScript Araçlar
// ÖZELLEŞTİR
E-posta:
Şifre:
Üye Ol
|
Şifremi Unuttum
>> Bayramınız kutlu olsun (0 yorum)>> Yeni yılınız kutlu olsun (0 yorum)>> JAVASCRİPT İndir ve JQUERY içerikleri (0 yorum)>> ASP İndir -- Forum bölümü (0 yorum)>> Yeni yılınız kutlu olsun (0 yorum)
// EN YENİLER
// EN POPÜLER
// Anasayfa » JAVASCRIPT» Sayaç
Oy:
<html> <script> /* Best Javascript b-day Countdown ev3r!1!! by Kevin O''Connor email:pile_o_nades@yahoo.com This countdown does some cool stuff: As we get closer to November 9th, the bday text gradually increases size until November 9 when it reaches 158px which is the maximum size. This would have had the most effect if I had made this alot earlier because if it was 2002, Bday would appear off in the distance because the font size would be alot smaller. Now it appears a lot closer. You can see this effect by putting a date in the "new Date()" below, such as today = new Date("February 07, 2005") and it will appear as a tiny glowing light in the distance. It shows the percent of time passed from February 07, 2005 to November 9, 2004. As of June 07, 2005 it was 100%. February 07, 2005 is when I developed this. -p */ //this is the maximum font size the "happy bday" text can be h2maxfontsize=158; //input future date here mm,dd,yyyy,hh,mm,ss onload=function(){countdown_to(06,07,2005,00,00,00)} function countdown_to(to_month,to_day,to_year,to_hour,to_minute,to_second){ tm=to_month;td=to_day;ty=to_year;th=to_hour,ti=to_minute;ts=to_second; timer=setTimeout("countdown_to(tm,td,ty,th,ti,ts)",500); month_name=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); today = new Date(); year = today.getFullYear(); month = today.getMonth(); day = today.getDate(); hour = today.getHours(); minute = today.getMinutes(); second = today.getSeconds(); current_str = month_name[month]+" "+day+", "+year+" "+hour+":"+minute+":"+second; future_str = month_name[to_month-1]+" "+to_day+", "+to_year+" "+to_hour+":"+to_minute+":"+to_second; countdown_str=Date.parse(future_str)-Date.parse(current_str); days_until=Math.floor(countdown_str/(60*60*1000*24)*1); hours_until=Math.floor((countdown_str%(60*60*1000*24))/(60*60*1000)*1); minutes_until=Math.floor(((countdown_str%(60*60*1000*24))%(60*60*1000))/(60*1000)*1); seconds_until=Math.floor((((countdown_str%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1); //when the countdown is done fire this function if(countdown_str <= 0){future_date_arrival()} //this is to count up the days from February 07, 2005 countup_str=Date.parse(current_str)-Date.parse("February 07, 2005"); divisor=(countup_str+countdown_str)/h2maxfontsize; h2fontsize=countup_str/divisor; if(days_until < 0){h2fontsize=h2maxfontsize;} Halo2_distance.style.fontSize=h2fontsize; percent_str=Math.floor(countup_str/(countup_str+countdown_str)*100)+"%"; //multiplies by -1 if future date is less than current date if(days_until < 0){days_until*=-1;days_until-=1} if(hours_until < 0){hours_until*=-1;hours_until-=1} if(minutes_until < 0){minutes_until*=-1;minutes_until-=1} if(seconds_until < 0){seconds_until*=-1;seconds_until-=1} //places zero ahead of number if single digit if(days_until < 10){days_until="0"+days_until} if(hours_until < 10){hours_until="0"+hours_until} if(minutes_until < 10){minutes_until="0"+minutes_until} if(seconds_until < 10){seconds_until="0"+seconds_until} countdown_str = days_until+":"+hours_until+":"+minutes_until+":"+seconds_until; count.innerHTML = countdown_str; percent_done.innerHTML=percent_str; } function future_date_arrival(){ Halo2_distance.style.filter="glow(color=pink,strength=15)"; date_arrival_msg.style.visibility="visible"; date_arrival_msg.innerHTML="ENTER THE MATRIX THAT HALO 2 IS"; } </script> <body scroll=no> <style> body{ background-color:000000; margin:0; } #Halo2_distance{ height:77%; margin:0; font-family:HaloRegular; color:white; filter:glow(color=green,strength=7); } #td_countdown{ height:23%; margin:0; font-family:Courier New; font-size:30; color:white; filter:glow(color=pink,strength=5); } #date_arrival_msg{ visibility:hidden; } </style> <table width="100%" height="100%" cellpadding=0 cellspacing=0> <td id="Halo2_distance" align="center"> BDAY </td><tr> <td id="td_countdown" align="center"> <span id="percent_done"></span> <span id="count"></span><br><br> <span id="date_arrival_msg"> </span> </td> </table> </html>
Kodu Kopyala
Hata Bildir | Tavsiye Et
Bu içeriğe oy verin:
Yorumlar / Yeni Yorum Yaz
ANA SAYFA | İÇERİK EKLE | YENİ EKLENENLER | EN POPÜLERLER | EN BEĞENİLENLER | REKLAM | DESTEKLEYENLER | İLETİŞİM