控制項|日曆 }
btnCell.onmouseout=function(){
btnCell.style.cssText="width:100%;border:1 outset;background-color:buttonface;";
}
// btnCell.onmousedown=function(){
// btnCell.style.cssText="width:100%;border:1 inset;background-color:#F0F0F0;";
// }
btnCell.onmouseup=function(){
btnCell.style.cssText="width:100%;border:1 outset;background-color:#F0F0F0;";
}
btnCell.onclick=function(){
btnCell.blur();
}
return btnCell;
}
this.setDefaultDate=function(){
var dftDate=new Date();
calendar.today[0]=dftDate.getYear();
calendar.today=dftDate.getMonth()+1;
calendar.today=dftDate.getDate();
}
/****************** Show Calendar *********************/
this.show=function(targetObject,defaultDate,sourceObject){
if(targetObject==undefined) {
alert("未設定目標對像. \n方法: ATCALENDAR.show(obj 目標對像,string 預設日期,obj 點擊對像);\n\n目標對像:接受日期傳回值的對像.\n預設日期:格式為\"yyyy-mm-dd\",預設為當日日期.\n點擊對像:點擊這個對像彈出calendar,預設為目標對像.\n");
return false;
}
else calendar.target=targetObject;
if(sourceObject==undefined) calendar.source=calendar.target;
else calendar.source=sourceObject;
var firstDay;
var Cells=new Array();