有好用的count up days嗎? - 部落格
By Isla
at 2010-09-15T16:38
at 2010-09-15T16:38
Table of Contents
看起來像作業 XD
自己寫一個吧
以下是程式碼 貼到Blogger的HTML/JavaScript
<div id="countdays"></div>
<script>
var today=new Date();
var year2000=new Date(2010,8,12); // 2010/9/12這裡就是你出國那天月份請減1
var diff=today-year2000;
diff=Math.round(diff/1000/60/60/24);
document.getElementById("countdays").innerHTML = "已流浪" + diff + "天";
</script>
※ 引述《ritandy (。瑞天帝.˙.)》之銘言:
: 最近架了一個紀錄交換生涯的blog
: 想找有沒有無廣告、可以計算過了幾天的widget
: 想算算一共出國幾天了?
: 謝謝!
--
Tags:
部落格
All Comments
By Ursula
at 2010-09-16T00:30
at 2010-09-16T00:30
Related Posts
有好用的count up days嗎?
By Zenobia
at 2010-09-15T13:26
at 2010-09-15T13:26
Re: PTT Blog板友簽到簿(PTTBlogRolling!)
By Ingrid
at 2010-09-15T12:07
at 2010-09-15T12:07
發現不能改文章文字顏色耶
By Tom
at 2010-09-15T06:58
at 2010-09-15T06:58
Re: PTT Blog板友簽到簿(PTTBlogRolling!)
By Susan
at 2010-09-14T16:26
at 2010-09-14T16:26
Re: PTT Blog板友簽到簿(PTTBlogRolling!)
By Annie
at 2010-09-14T13:17
at 2010-09-14T13:17