這個是我寫的小小程式~~
用來計算我目前狗雞online的等級趴數XD
嗚嗚~~~~真難練~~~~怪又難打......shit.........
目前這程式在網頁讀取完畢會再頭圖下方那段description欄位自動覆蓋上去
我覺得我射的變數還蠻淺顯易懂的~~~~~有興趣的可以看看~~並改成自己的練功進度XDDX
Source Code
function setDescription()
{
var currentDate = Date.parse(new Date());
var startDay = new Date();
startDay.setYear(2008);
startDay.setMonth(9);
startDay.setDate(1);
var differDays;
differDays = currentDate - Date.parse(startDay);
differDays = differDays / 86400000;
var decreaseDays = 26;
var progress = (differDays + decreaseDays )/365;
document.getElementById('description_bitty').innerHTML = "Bitty's current military duty progress is " + (progress * 100) + "%, Passed " + differDays + " Days.";
}
沒有留言:
發佈留言