当前位置: 首页 > 图文教程 > 网页制作 > HTML/XHTML教程 > 源码学习:一个简单的日历控件(5)

HTML/XHTML教程
按颜色分类:红色系(Red)
按颜色分类:黄色系(Yellow)
网页设计配色精彩十例
按形容词分类:可爱、快乐、有趣
按形容词分类:柔和、明亮、温和
按形容词分类:运动型、轻快
按形容词分类:轻快、华丽、动感
按颜色分类:蓝紫色系(Purple Blue)
按形容词分类:回味、女性化、优雅
按形容词分类:简单、时尚、高雅
按形容词分类:忠厚、稳重、有品位
Xhtml第4天:调用样式表
Xhtml第7天:css入门知识
Xhtml第1天:选择什么样的DOCTYPE
Xhtml第10天:div自适应高度
Xhtml第12天:校验及常见错误
Xhtml第6天:XHTML代码规范
Xhtml第5天:head区的其他设置
Xhtml第8天:CSS布局入门技术
Xhtml第9天:第一个css布局实例

HTML/XHTML教程 中的 源码学习:一个简单的日历控件(5)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-04   浏览: 79 ::
收藏到网摘: n/a

   }
   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();