mark
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>获得年份 </title>
<script type="text/javascript">
var mydate=new Date();
var myyear=mydate.getFullYear();
document.write("年份:"+myyear+"<br>");
mydate.setFullYear(14);
document.write(mydate+"<br>");
</script>
</head>
<body>
</body>
</html>
年份:2014
Thu Dec 25 14 10:17:02 GMT+0800 (中国标准时间)
结果格式依次为:星期、月、日、年、时、分、秒、时区。(