原创 js獲取當前時間日期

function gettime(){ var date = new Date(); var year = date.getFullYear(); var month = date.getMonth()+1;//js中是從0開始所以