getNowTime() {
var date = new Date();
year = date.getFullYear();
month = date.getMonth() + 1;
var monthStr = month >= 10 ? month : "0" + month;
day = date.getDate();
var dayStr = day >= 10 ? day : "0" + day;
hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
second = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
milliSeconds = date.getMilliseconds();
return year + monthStr + dayStr + hour + minute + second + milliSeconds;
}

个人笔记专用