date 入职题
来源:5-10 编程练习
慕丝7347533
2017-10-23 11:16:15
var year=prompt("请输入员工的入职年份"),
month=prompt("请输入员工的入职月份"),
date=prompt("请输入员工的入职时间");
var today=new Date(),
newyear=today.getFullYear(),
newmonth=today.getMonth(),
newdate=today.getDate();
document.write("合同入职时间是:"+year+month+date);
var newtoday=new Date(),
newtoday.setFullYear(newtoday.getFullYear()+3),
document.write("合同到期时间是"+newtoday.setFullYear+newmonth+newdate);
哪里错了
、、、????显示不出来
1回答
樱桃小胖子
2017-10-23
标点符号写错了,使用一个var声明多个变量,最后一个变量需要使用分号设置,表示结束,
祝学习愉快~
相似问题