什么是js 怎么把js獲取的系統(tǒng)時(shí)間加一年?
怎么把js獲取的系統(tǒng)時(shí)間加一年?代碼如下:JS如何獲取當(dāng)前系統(tǒng)時(shí)間?javascript有一個(gè)對(duì)象(構(gòu)造函數(shù)),date()。代碼如下:VAR odate=new date()//時(shí)間對(duì)象的實(shí)例;oD
怎么把js獲取的系統(tǒng)時(shí)間加一年?
代碼如下:
JS如何獲取當(dāng)前系統(tǒng)時(shí)間?
javascript有一個(gè)對(duì)象(構(gòu)造函數(shù)),date()。代碼如下:VAR odate=new date()//時(shí)間對(duì)象的實(shí)例;oDate.getFullYear公司()//獲取系統(tǒng)年份;oDate.GETMONT月()1//獲取系統(tǒng)月份,因?yàn)樵路菔菑?開始計(jì)算的,所以添加1oDate.getDate日期()//獲取系統(tǒng)日,oDate.getHours時(shí)間()//獲取系統(tǒng)時(shí),oDate.getMinutes文件()//點(diǎn)oDate.getSeconds秒()//秒