为什么输出年份可以赋值给一个参数, 设置年份不可以赋值给一个参数,然后输出呢
<!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);*/
var mydate=new Date();
document.write(mydate+"<br />");
var myyear=mydate.getFullYear();
document.write(myyear+"<br />");
/* mydate.setFullYear(81); //设置年份
document.write(mydate+"<br>"); */
var x= mydate.setFullYear(81)
document.write(x);
</script>
</head>
<body>
</body>
</html>