HTML组件之:编写日历(3),HTML组件之:编写日历(3)
【 tulaoshi.com - Html 】
===编写日历一===function setCal() { 
// standard time attributes 
var now = new Date(); 
var year = now.getFullYear(); 
var month = now.getMonth(); 
var monthName = getMonthName(month); 
var date = now.getDate(); 
now = null; 
// create instance of first day of month, and extract the day on which it occurs 
var firstDayInstance = new Date(year, month, 1); 
var firstDay = firstDayInstance.getDay(); 
firstDayInstance = null; 
// number of days in current month 
var days = getDays(month, year); 
// call function to draw calendar 
drawCal(firstDay + 1, days, date, monthName, year); 
} 
来源:http://www.tulaoshi.com/n/20160129/1484748.html
看过《HTML组件之:编写日历(3)》的人还看了以下文章 更多>>