时间控件8

htmloDayTable+="</tbody></table>";
/// Today Button
htmloButton="<div align='center' style='padding:3px'>"
htmloButton+="<button id='"+this.sTODAYBTNID+"' style='width:40%;border:1px solid #BCD0DE;background-color:#eeeeee;cursor:pointer'"
htmloButton+=" onclick=CalendarTodayClick("+this.instanceName+")>"+this.oBtnTodayTitle  +"</button>&nbsp;"
htmloButton+="<button style='width:40%;border:1px solid #BCD0DE;background-color:#eeeeee;cursor:pointer'"
htmloButton+=" onclick=CalendarCancel("+this.instanceName+");CalendarClear("+this.instanceName+")>"+this.oBtnCancelTitle+"</button> "
htmloButton+="</div>"
/// All
htmlAll=htmlAll+htmloMonth+htmloYear+htmloDayTable+htmloButton+"</div>"; //$("msg").innerHTML=htmlAll;
//document.write("asdf<a href='#'>111111aaaaaaaa</a>");
document.write(htmlAll); //document.write("|stz|"+htmlAll); $("msg").innerText=htmlAll; return;
//$("msg").innerText=htmlAll;
// document.body.insertAdjacentHTML("beforeEnd",htmlAll); //mfy +stz
this.Fill();
}
function CalendarFill() ///
{
var sMonth,sYear,sWeekDay,sToday,oTable,currRow,MaxDay,iDaySn,sIndex,rowIndex,cellIndex,oSelectMonth,oSelectYear;
sMonth=this.currDate.getMonth();
sYear=this.currDate.getFullYear(); //alert(sYear);  getYear在ie里不同
sWeekDay=(new Date(sYear,sMonth,1)).getDay();
sToday=this.currDate.getDate();
iDaySn=1; //alert(this.sTABLEID);
oTable=$(this.sTABLEID);
currRow=oTable.rows[1];
MaxDay=CalendarGetMaxDay(sYear,sMonth);

oSelectMonth=$(this.sMONTHID)
oSelectMonth.selectedIndex=sMonth;
oSelectYear=$(this.sYEARID)
for(i=0;i<oSelectYear.length;i++)
{
if(parseInt(oSelectYear.options[i].value)==sYear)oSelectYear.selectedIndex=i;
}
////
for(rowIndex=1;rowIndex<=6;rowIndex++)
{
if(iDaySn>MaxDay)break;
currRow = oTable.rows[rowIndex];
cellIndex = 0;
if(rowIndex==1)cellIndex = sWeekDay;
for(;cellIndex<currRow.cells.length;cellIndex++)
{
if(iDaySn==sToday)
{
currRow.cells[cellIndex].innerHTML="<font color='"+this.selectedfontColor+"'><i><b>"+iDaySn+"</b></i></font>";
this.oPreviousCell=currRow.cells[cellIndex];
}
else
{
currRow.cells[cellIndex].innerHTML=iDaySn;
currRow.cells[cellIndex].style.color=this.normalfontColor;
}
CalendarCellSetCss(0,currRow.cells[cellIndex]);
iDaySn++;
if(iDaySn>MaxDay)break;
}
}
}

你可能感兴趣的:(IE)