Turk-Php Forumu nda bir kaç arkadaşın geri sayım scripti aradıklarını görmüştüm. Bir internet sitesinde (sanırım TUBITAK 'ın güneş tutulması ile ilgili sitesiydi) gördüğüm bu geri sayım scriptini paylaşmak istedim. Hiçbir değişikliğe gerek kalmadan kullanılabiliyor. onload gibi trigger lara ihtiyacınız yok. Sadece sayfanızda sectiginiz hucrenin icinde caliştırın... <script> //Countdown script by Mike Thompson //http://www.members.tripod.com/webdesign123now/ //Based on script by Website Abstraction (http://wsabstract.com) var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") function countdown(yr,m,d){ var today=new Date() var todayy=today.getYear() if (todayy < 1000) todayy+=1900 var todaym=today.getMonth() var todayd=today.getDate() var todaystring=montharray[todaym]+" "+todayd+", "+todayy var futurestring=montharray[m-1]+" "+d+", "+yr var difference=(Math.round((Date.parse(futurestring) -Date.parse(todaystring))/(24*60*60*1000))*1) if (difference==0) //change msg here document.write("Eclipse!") else if (difference>0) //change msg here document.write("Kalan gün / days remaining : "+difference+"") } //enter the count down date using the format year/month/day countdown(2006,3,29) </script>
|