<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>JavaScript对象</title><script>var date= new Date(); document.write("now it's"+ date.getFullYear()+"年"+(date.getMonth()+1)+"月"+date.getDate()+"日 ");var day = date.getDay();switch(day){ case 0: d = "Sunday"; break; case 1: d = "Monday"; break; case 2: d = "Tuesday"; break; case 3: d = "Wednesday"; break; case 4: d = "Thursday"; break; case 5: d = "Friday"; break; default: d = "Saturday";}document.write(d+" ");if(date.getHours()<10){ document.write("0");}document.write(date.getHours()+":");if(date.getMinutes()<10){ document.write("0");}document.write(date.getMinutes()+":");if(date.getSeconds()<10){ document.write("0"); }document.write(date.getSeconds());</script></head><body></body></html>
添加回答
举报
0/150
提交
取消