Loading...

JavaScript 取得今天日期

Temperature: 0 °C

Mark ChangMark Chang
author_tools

JavaScript 使用 Date() 來取得時間的資訊。

再使用指令如 getDate()、getMonth()、getFullYear() 分別來取得日、月、年結果如下:

var Today=new Date();
document.write("今天日期是 " + Today.getFullYear()+ " 年 " + (Today.getMonth()+1) + " 月 " + Today.getDate() + " 日");

參考網址Url link

以上紀錄~
 

https://innstory.com/story-JavaScript_取得今天日期-1906
javascript

Prev
 使用jQuery阻止input直接按Enter就送出表單

Next
利用htaccess隱藏副檔名html和php 

About the Author

Mark Chang

離不開電腦的宅男

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

使用PHP取得指定月份最後一天的日期

使用PHP取得指定月份最後一...

使用PHP要如何抓某個月份的最後一天 例如抓本月份的話可以使用下列範例: date(&#;Ymt&#...

jQuery resize取得瀏覽器目前視窗寬度

jQuery resize取...

pexelsphotokeyboard5 在使用CSS調整RWD顯示時~ 也可以使用javascri...

PDO bindParam 和 bindValue 差別在哪裡?

PDO bindParam ...

首先 bindParam 是綁定變數、bindValue  是綁定值。 以下範例: bindPara...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format