源码学习:一个简单的日历控件(6),源码学习:一个简单的日历控件(6)
【 tulaoshi.com - Javascript 】
if(defaultDate==undefined || defaultDate==""){   calendar.calendarPad.style.display="";
   var theRows = Math.ceil((theMonthLen)/7);
   //清除旧的日历;
   while (calendar.body.rows.length  0) {
    calendar.body.deleteRow(0)
   }
   //建立新的日历;
   var n=0;day=0;
   for(i=0;i<theRows;i++){
    theRow=calendar.body.insertRow(i);
    for(j=0;j<7;j++){
     n++;
     if(ntheFirstDay && n<=theMonthLen){
      day=n-theFirstDay;
      calendar.insertBodyCell(theRow,j,day);
     }
来源:http://www.tulaoshi.com/n/20160129/1483045.html
看过《源码学习:一个简单的日历控件(6)》的人还看了以下文章 更多>>