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

HTML/XHTML教程
网页页面 自动刷新的3种代码
网页制作 TD也可以溢出隐藏显示
网页设计 TabIndex元素
HTML非常用标签 optgroup、sub、sup和bdo示例代码
html超级链接标记A的TARGET属性详解
语义化的网页 XHTML语义化标记
各种MOUSE鼠标形状的表示方法
左右移动转换文字特效HTML代码解析
IE6的BUG及修复 谓防患于未然的策略
编写email邮件的HTML页面原则小结
熟手的html编写风格与原因分析
常见的HTML标记错误写法
html 块级标签与内联标签的区别
IE6的BUG及修复:谓防患于未然的策略
制作编写HTML邮件的编写原则
HTML Symbol Entities美化网页小图标
HTML代码编写的常用5个原则以及原因
HTML基础教程:常见的HTML标记错误写法
经验分享:淘宝网店网页标题优化和宝贝橱窗推荐
W3C验证XHTML常见的5个错误

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


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

  this.getMonthLen=function(theYear, theMonth) {
   theMonth--;
   var oneDay = 1000 * 60 * 60 * 24;
   var thisMonth = new Date(theYear, theMonth, 1);
   var nextMonth = new Date(theYear, theMonth + 1, 1);
   var len = Math.ceil((nextMonth.getTime() - thisMonth.getTime())/oneDay);
   return len;
  }
  /************** 隐藏日历 *********************/
  this.hide=function(){
   //calendar.clearEventKey();
   calendar.calendarPad.style.display="none";
  }
  /************** 从这里开始 *********************/
  this.setup=function(defaultDate){
   calendar.addCalendarPad();
   calendar.addCalendarBoard();
   calendar.setDefaultDate();
  }
  /************** 关于AgetimeCalendar *********************/
  this.about=function(){
   /*//alert("Agetime Calendar V1.0\n\nwww.agetime.com\n");
   popLeft = calendar.calendarPad.style.pixelLeft+4;
   popTop = calendar.calendarPad.style.pixelTop+25;
   var popup = window.createPopup();
   var popupBody = popup.document.body;
   popupBody.style.cssText="border:solid 2 outset;font-size:9pt;background-color:#F0F0F0;";
   var popHtml = "<span style='color:#336699;font-size:12pt;'><U>关于 AgetimeCalendar</U></span><BR><BR>";
   popHtml+="版本: v1.0<BR>日期: 2004-03-13";
   popupBody.innerHTML=popHtml;
   popup.show(popLeft,popTop,240,136,document.body); */
   var strAbout = "About AgetimeCalendar\n\n";
   strAbout+="-\t: 关于\n";
   strAbout+="x\t: 隐藏\n";
   strAbout+="<<\t: 上一年\n";
   strAbout+="<\t: 上一月\n";