日期对象(Date)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
var date = new Date(); //获取到当前的系统时间
document.write("年:"+ date.getFullYear()+"<br/>");//获取当前年份
document.write("月:"+ (date.getMonth()+1)+"<br/>");//getMonth+1才是当前月份
document.write("日:"+ date.getDate()+"<br/>");//当前月份的具体日期
document.write("日:"+ date.getDay()+"<br/>");//当前周几
document.write("时:"+ date.getHours()+"<br/>");
document.write("分:"+ date.getMinutes()+"<br/>");
document.write("秒