时间控件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+=" οnclick=CalendarTodayClick("+this.instanceName+")>"+this.oBtnTodayTitle +"</button> "
htmloButton+="<button style='width:40%;border:1px solid #BCD0DE;background-color:#eeeeee;cursor:pointer'"
htmloButton+=" οnclick=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;
}
}
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值