源码学习:一个简单的日历控件(5)
时间:2007-01-12 02:52:45
来源: 作者: 点击:次 出处:技术无忧
关键字:源码
}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[1]=dftDate.getMonth()+1;
calendar.today[2]=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();











文章评论
共有 0 位网友发表了评论 此处只显示部分留言 点击查看完整评论页面