var now=new Date(); 获取当前的时间
now.setDate(1); 强制设置时间
table.appendChild(headRow)
固定表头,星期
var tds=firstDay+dayOfMonths[month]
让每月的每天对应星期
var rows=Math.ceil(tds/7) 上取整
var countBlanks=0 数1日前的空白单元格
var countDays=0 数每月从1日开始的单元格
var now=new Date(); 获取当前的时间
now.setDate(1); 强制设置时间
table.appendChild(headRow)
固定表头,星期
var tds=firstDay+dayOfMonths[month]
让每月的每天对应星期
var rows=Math.ceil(tds/7) 上取整
var countBlanks=0 数1日前的空白单元格
var countDays=0 数每月从1日开始的单元格