| Author reply |
原來那一欄沒有連結喔?
偶那時看到就抓下來了、沒多注意。
語法如下,盡量挾去配~
<script>
/*
Count up from any date script-
By JavaScript Kit (www.javascriptkit.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()
if (todayy < 1000)
todayy+=1900
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+="天"
document.write("今天是李慶安雙重國籍案被揭發後的第"+difference)
}
/*
enter the count up date using the format year/month/day
*/
countup(2008,3,12)
</script> |