//添加事件y.addEventListener('change', function() {
year = this.value
month = month
dayInWeek = new Date(year, month, 1).getDay()
printDay()
})
m.addEventListener('change', function() {
year = year
month = this.value
dayInWeek = new Date(year, month, 1).getDay()
printDay()
})y事件能够触发并且执行,m触发之后整个日历就变空白了,如下图:
添加回答
举报
0/150
提交
取消