JS日期對象的使用方式

JS日期對象的創建和使用方式 var oDate = new Date(); //創建日期對象 oDate.getFullyear(); //年 oDate.getMonth() + 1; //月份的格式是0-11 所以顯示的時候我們要+1 oDate.getDate(); //日 oDate.getHours(); //時 oDate.getMinutes(); //分 oDate.getSec
相關文章
相關標籤/搜索