js Date对象
2019獨角獸企業重金招聘Python工程師標準>>>
<html> <script?type="text/javascript">var?myDate?=?new?Date();document.write(myDate);//返回當日的日期和時間。 //document.write("<br>月份的某一天:"+myDate.getDate());//返回月份的某一天 //document.write("<br>一周中的某一天?(0?~?6):"+myDate.getDay());//返回一周中的某一天?(0?~?6) //document.write("<br>月份?(0?~?11):"+myDate.getMonth());//返回月份?(0?~?11) //document.write("<br>年份:"+myDate.getFullYear());//以四位數字返回年份 //document.write("<br>小時?(0?~?23):"+myDate.getHours());//返回?小時?(0?~?23)。 //document.write("<br>分鐘?(0?~?59):"+myDate.getMinutes());//返回?分鐘?(0?~?59)。 //document.write("<br>秒數?(0?~?59):"+myDate.getSeconds());//返回?秒數?(0?~?59)。 //document.write("<br>至今的毫秒數:"+myDate.getTime());//返回?1970?年?1?月?1?日至今的毫秒數。 </script> </html>轉載于:https://my.oschina.net/u/2255569/blog/365511
總結
- 上一篇: 怎样推断一棵二叉树是全然二叉树
- 下一篇: java jsp Struts2.X 文