日期:2013-07-06  浏览次数:20959 次

function rlCtrl()
{
// DateCtrl created by yyc 2000-6-18
// Copyright (C) 2000.6 yyc, All Rights Reserved
// this is a free class,but you must be reserve this comments
// E-mail:yycmail@263.net
var varMe,s,d,i;
var len= rlCtrl.arguments.length;
if (len>0)
{
varMe=rlCtrl.arguments[0];
this.name=varMe;
if (len>=4)
{
this.year=rlCtrl.arguments[1];
this.month=rlCtrl.arguments[2];
this.day=rlCtrl.arguments[3];
}
else
{
today=new Date();
this.year=today.getYear();
this.month=today.getMonth()+1;
this.day=today.getDate();
}
this.getdate=getCurDate;

document.writeln('<TABLE width=160px border=0 cellPadding=0 cellSpacing=0>');
document.writeln('<TR><td>');
d=new Date(this.year,this.month-1,this.day);
i=d.getDay();
s=getsweek(i);
s=this.year+"年"+this.month+"月"+this.day+"日--"+s
document.writeln('<INPUT id=txt'+varMe+' name=txt'+varMe+' ondblclick=\'opencls('+varMe+');\' style="FONT-SIZE: 9pt; FONT-STYLE: normal; HEIGHT: 20px; width:100%" value='+s+' readonly ></TD>');
document.writeln('<TD width=15px>');
document.writeln('<input type=button onclick=\'opencls('+varMe+');\' style=" cursor:hand;FONT-SIZE: 8pt; FONT-STYLE: normal;" value="▼">');
document.writeln('</TD></TR>');
document.writeln("</table>");

document.writeln('<div id=div'+varMe+' name =div'+varMe+' style=" POSITION:absolute;display:none; WIDTH: 160px">');
document.writeln('<TABLE id=tbl'+varMe+' name=tbl'+varMe+' WIDTH=100% BGCOLOR=#c0c0c0 onkeyup=\'doKey('+varMe+',window.event.keyCode) \' ALIGN=center style="COLOR: blue; FONT-SIZE: 9pt;" BORDER=1 CELLSPACING=1 CELLPADDING=1>');
document.writeln("<TR><TD colspan=7>");
document.writeln('<INPUT id=year'+varMe+' name=year'+varMe+' value='+this.year+' style="BACKGROUND-COLOR:transparent; BORDER-BOTTOM: green 0px solid;BORDER-LEFT: green 0px solid;BORDER-RIGHT: green 0px solid; BORDER-TOP: green 0px solid;COLOR: blue;CURSOR: hand; FONT-SIZE: 10pt; HEIGHT: 15px; MARGIN-TOP: 0pt; WIDTH: 35px" ');
document.writeln('onmousemove =\'javascript:if (this.readOnly) {this.style.backgroundColor=0xffffff; this.style.borderWidth=1;} \'');
document.writeln('onmouseout =\'javascript: if (this.readOnly) { this.style.backgroundColor ="transparent";this.style.borderWidth=0;} \' ');
document.writeln('onclick=\'javascript: this.style.cursor="default"; this.readOnly=0; this.select(); this.focus(); \' ');
document.writeln('onblur=\'javascript:this.style.backgroundColor="transparent"; this.style.borderWidth=0; this.style.cursor="hand"; this.readOnly=1; this.value='+varMe+'.year;dispDate('+varMe+'); \' '); //tbl'+varMe+'.focus();
document.writeln('onkeypress=\'javascript:if (window.event.keyCode==13||window.event.keyCode ==27){ if (window.event.keyCode==13) '+varMe+'.year=this.value; this.blur(); }else if (window.event.keyCode<48||window.event.keyCode>57) window.event.keyCode =0;\'');
document.writeln('readonly maxlength=4>');
//=====================
document.writeln('年<span style="cursor:hand" onclick=\''+varMe+'.year='+varMe+'.year+1;year'+varMe+'.innerText='+varMe+'.year;dispDate('+varMe+');\'>▲</span><span style="cursor:hand" onclick=\''+varMe+'.year='+varMe+'.year-1;year'+varMe+'.innerText='+varMe+'.year;dispDate('+varMe+');\'>▼</span>');