js獲取時間並實現字符串和時間戳之間的轉換

獲取當前時間: 時間 var myDate = new Date(); //當前時間 年份 var year = myDate.getFullYear(); 月份 var month = myDate.getMonth() + 1; 日 var day = myDate.getDate(); 年份(2位) myDate.getYear(); 完全年份 (4位,1970-????)
相關文章
相關標籤/搜索