时间控件7

function CalendarInit() ///Create panel
{
var sMonth,sYear
sMonth=this.currDate.getMonth();
sYear=this.currDate.getFullYear();
htmlAll="<div id='"+this.sDIVID+"' style='display:none;position:absolute; z-index:1000; width:"+this.Width+"px;border:"+this.divBorderCss+";padding:2px;background-color:#FFFFFF; left:0px; top:0px;'>"; //moveStart(event,\'"+ this.sDIVID +"\'); ondeactivate ='alert(1)'
htmlAll+="<div align='center'>";
/// Month
if(this.canmove){ //alert(this.movePicPath);
htmloMonth="<select id='"+this.sMONTHID+"' οnchange=CalendarMonthChange("+this.instanceName+") style='width:25%'>"; //<img src='"+ this.movePicPath +"moveCursor.gif' width=17 height=17 style='cursor:move' οnmοusedοwn='moveStart(event,\""+ this.sDIVID +"\");' οnmοuseup='moveEnd(\""+ this.sDIVID +"\")'>
}else{
htmloMonth="<select id='"+this.sMONTHID+"' οnchange=CalendarMonthChange("+this.instanceName+") style='width:25%'>";
}
for(i=0;i<12;i++)
{
htmloMonth+="<option value='"+i+"'>"+this.monthSting[i]+"</option>";
}
htmloMonth+="</select>";
/// Year
htmloYear="<select id='"+this.sYEARID+"' οnchange=CalendarYearChange("+this.instanceName+") style='width:25%'>";
for(i=this.startYear;i<=this.endYear;i++)
{
htmloYear+="<option value='"+i+"'>"+i+"</option>";
}
htmloYear+="</select>"; //alert(this.currDate.getHours());

if(this.instanceName=="oCalendarChs"){
htmloYear+=" <input id='"+this.sHOURID+"' value="+ this.currDate.getHours() +" maxlength=2 class='input_time'>时 <input id='"+this.sMINUTEID+"' value="+ this.currDate.getMinutes() +" maxlength=2 class='input_time'>分 <input id='"+this.sSECONDID+"' value="+ this.currDate.getSeconds() +" maxlength=2 class='input_time'>秒</div>"; //+stz
}else{
htmloYear+=" <input id='"+this.sHOURID+"' value="+ this.currDate.getHours() +" maxlength=2 class='input_time'> H <input id='"+this.sMINUTEID+"' value="+ this.currDate.getMinutes() +" maxlength=2 class='input_time'> M <input id='"+this.sSECONDID+"' value="+ this.currDate.getSeconds() +" maxlength=2 class='input_time'> S</div>"; //+stz
}



/// Day
htmloDayTable="<table id='"+this.sTABLEID+"' width='100%' border=0 cellpadding=0 cellspacing=1 bgcolor='"+this.tableBorderColor+"'>";
htmloDayTable+="<tbody bgcolor='#ffffff'style='font-size:13px'>";
for(i=0;i<=6;i++)
{
if(i==0)
htmloDayTable+="<tr bgcolor='" + this.titleTableBgColor + "'>";
else
htmloDayTable+="<tr>";
for(j=0;j<7;j++)
{

if(i==0)
{
htmloDayTable+="<td height='20' align='center' valign='middle' style='cursor:pointer'>";
htmloDayTable+=this.weekDaySting[j]+"</td>"
}
else
{
htmloDayTable+="<td height='20' align='center' valign='middle' style='cursor:pointer'";
htmloDayTable+=" οnmοuseοver=CalendarCellsMsOver(event,"+this.instanceName+")";
htmloDayTable+=" οnmοuseοut=CalendarCellsMsOut(event,"+this.instanceName+")";
htmloDayTable+=" οnclick=CalendarCellsClick(this,"+this.instanceName+")>";
htmloDayTable+=" </td>"
}
}
htmloDayTable+="</tr>";
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值