ANA SAYFA | FORUM | BLOG | 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 Forumda JAVAScript Araçlar
// ÖZELLEŞTİR
E-posta:
Şifre:
Üye Ol
|
Şifremi Unuttum
>> PHP Arşivimiz Gelişiyor! (0 yorum)>> ARŞİVİMİZ FORUM AÇILDI! (0 yorum)>> Ramazan Bayramınız kutlu olsun (2 yorum)>> Kurban Bayramı (0 yorum)>> 10 Kasım (1 yorum)
// EN YENİLER
// EN POPÜLER
// Anasayfa » JAVASCRIPT» Sayaç
Oy:
<!-- TWO STEPS TO INSTALL EVENT COUNTDOWN: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <script type="text/javascript"> <!-- /* This script and many more are available free online at The JavaScript Source!! http://javascript.internet.com Created by: James Crooke :: http://www.cj-design.com ** Additional formats can be seen on the Web site at: http://www.cj-design.com/demos/cjeventcountdownv1/ */ function renderMessage(dateStr, msg1, msg2, countFrom) { var date = new Date(dateStr); var now = new Date(); var diff = date.getTime() - now.getTime(); var days = Math.floor(diff / (1000 * 60 * 60 * 24)) + 1; if(days < 1) { document.write(msg1); } else { if(countFrom) days = countFrom - days; document.write(msg2.replace(/%days%/g, number_format(days))); } } function number_format(num) { num = num.toString().replace(/\$|\,/g,''); if(isNaN(num)) { num = "0"; } sign = (num == (num = Math.abs(num))); num = Math.floor(num*100+0.50000000001); num = Math.floor(num/100).toString(); for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++) num = num.substring(0,num.length-(4*i+3))+','+ num.substring(num.length-(4*i+3)); return (((sign)?'':'-') + num); } // --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <p> In this example, the date is set to <strong>December 11, 2008</strong>, a date in the future...</p> <blockquote> <script type="text/javascript"> <!-- // 1st parameter: "target date", 2nd parameter: "late message", 3rd parameter: "early message". renderMessage("December 11, 2008", "You missed it!!", "Hurry, there's only %days% days to go!"); //--> </script> </blockquote> <p> In this example, the date is set to <strong>November 15, 2005</strong>, a date which has passed...</p> <blockquote> <script type="text/javascript"> <!-- renderMessage("November 15, 2005", "You missed it!", "Hurry, there's only %days% days to go!"); //--> </script> </blockquote> <p><center> <font face="arial, helvetica" size"-2">Free JavaScripts provided<br> by <a href="http://javascriptsource.com">The JavaScript Source</a></font> </center><p> <!-- Script Size: 2.36 KB -->
Kodu Kopyala
Hata Bildir | Tavsiye Et
Bu içeriğe oy verin:
Yorumlar / Yeni Yorum Yaz Bu içeriğe yorum yazılmamış.
ANA SAYFA | İÇERİK EKLE | YENİ EKLENENLER | EN POPÜLERLER | EN BEĞENİLENLER | REKLAM | DESTEKLEYENLER | İLETİŞİM
JAVAScript İndir © 2004 - 2008Web Tasarımı: Emir Emiroğlu | Kodlama: Can "FiNaRFiN" HANHAN , Korkut TAHAOĞLU, Göktuğ İÇÖZ