寫程式的時候用到的,先記錄下來以免之後又忘了._.
我是個健忘的人阿...
- getTime() - Number of milliseconds since 1/1/1970 @ 12:00 AM
- getSeconds() - Number of seconds (0-59)
- getMinutes() - Number of minutes (0-59)
- getHours() - Number of hours (0-23)
- getDay() - Day of the week(0-6). 0 = Sunday, ... , 6 = Saturday
- getDate() - Day of the month (0-31)
- getMonth() - Number of month (0-11)
- getFullYear() - The four digit year (1970-9999)
從這個網站看來的http://www.tizag.com/javascriptT/javascriptdate.php
大概是這樣用吧
var today = new Date()
var month = today.getMonth();
...以下類推XD
0 意見:
張貼留言