document.write("定义时间对象.........."+"<br/>");
var oToday=new Date();
document.write("获取年,月,日,时,分,秒.........."+"<br/>");
document.write("年:"+oToday.getFullYear()+"<br/>");
document.write("月:"+oToday.getMonth()+"<br/>");
document.write("日:"+oToday.getDate()+"<br/>");
document.write("时:"+oToday.getHours()+"<br/>");
document.write("分:"+oToday.getMinutes()+"<br/>");
document.write("秒:"+oToday.getSeconds()+"<br/>");
document.write("设置年,月,日,时,分,秒.........."+"<br/>");
var oDate=new Date();
oDate.setFullYear(2020);
document.write("年:"+oDate.getFullYear()+"<br/>");
oDate.setMonth(5);
document.write("月:"+oDate.getMonth()+"<br/>");
oDate.setDate(23);
document.write("日:"+oDate.getDate()+"<br/>");
oDate.setHours(16);
document.write("时:"+oDate.getHours()+"<br/>");
oDate.setMinutes(59);
document.write("分:"+oDate.getMinutes()+"<br/>");
oDate.setSeconds(35);
document.write("秒:"+oDate.getSeconds()+"<br/>");
document.write("星期几........."+"<br/>");
var weeks=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]
document.write("今天是:"+weeks[oToday.getDay()]+"<br/>");
var oPrintDate = new Date(2019, 5, 1, 15, 59, 59, 999);
oPrintDate.getFullYear(2019);
document.write(oPrintDate.getFullYear()+"年");
oPrintDate.getMonth(5);
document.write(oPrintDate.getMonth()+"月");
oPrintDate.getDate(1);
document.write(oPrintDate.getDate()+"日");
oPrintDate.getHours(15);
document.write(oPrintDate.getHours()+"时");
oPrintDate.getMinutes(59);
document.write(oPrintDate.getMinutes()+"分");
oPrintDate.getSeconds(59);
document.write(oPrintDate.getSeconds()+"秒");
oPrintDate.getUTCMilliseconds(999);
document.write(oPrintDate.getUTCMilliseconds()+"毫秒");
console