JavaScript 取得今天日期
Temperature: 0 °C
再使用指令如 getDate()、getMonth()、getFullYear() 分別來取得日、月、年結果如下:
var Today=new Date();
document.write("今天日期是 " + Today.getFullYear()+ " 年 " + (Today.getMonth()+1) + " 月 " + Today.getDate() + " 日");
參考網址連結網址
以上紀錄~
HOME All Categories JavaScript ...
Temperature: 0 °C
var Today=new Date();
document.write("今天日期是 " + Today.getFullYear()+ " 年 " + (Today.getMonth()+1) + " 月 " + Today.getDate() + " 日");
Mark Chang
離不開電腦的宅男
Leave some footprints to prove that you visited me
Author's other related stories
Please select an option
error
Copy complete
Hi, thank you for your participation, but you cannot vote repeatedly~
Wrong format