1:时间对象创建
var mydate=new Date();
2:时间对象方法运用:
如取年值:
var year=mydate.getFullYear();
取月值:
var month=mydate.getMonth();
取小时:
var hour=mydate.getHours();