Visitantes

segunda-feira, 22 de agosto de 2011

dias online contador

<script>

montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
function countup(yr,m,d){
today=new Date()
todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
todaym=today.getMonth()
todayd=today.getDate()
todaystring=montharray[todaym]+" "+todayd+", "+todayy
paststring=montharray[m-1]+" "+d+", "+yr
difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
difference+=" days"
document.write("Já tem "+difference+" dias desde que o meu site entrou no ar.")
}
//enter the count up date using the format year/month/day
countup(1999,01,15)
</script>

Um comentário: