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

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教程 中的 源码学习:一个简单的日历控件(2)


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

   var tbBoard=document.createElement("table");
   divBoard.insertAdjacentElement("beforeEnd",tbBoard);
   tbBoard.style.cssText="position:absolute;top:0;left:0;width:100%;height:10;font-size:9pt;";
   tbBoard.cellPadding=0;
   tbBoard.cellSpacing=1;
   tbBoard.bgColor="#333333";

  /************** 设置各功能按钮的功能 *********************/
   /*********** Calendar About Button ***************/
   trRow = tbBoard.insertRow(0);
   calendar.calendarAbout=calendar.insertTbCell(trRow,0,"-","center");
   calendar.calendarAbout.onclick=function(){calendar.about();}
   /*********** Calendar Head ***************/
   tbCell=trRow.insertCell(1);
   tbCell.colSpan=5;
   tbCell.bgColor="#99CCFF";
   tbCell.align="center";
   tbCell.style.cssText = "cursor:default";
   calendar.head=tbCell;
   /*********** Calendar Close Button ***************/
   tbCell=trRow.insertCell(2);
   calendar.calendarClose = calendar.insertTbCell(trRow,2,"x","center");
   calendar.calendarClose.title="关闭";
   calendar.calendarClose.onclick=function(){calendar.hide();}

   /*********** Calendar PrevYear Button ***************/
   trRow = tbBoard.insertRow(1);
   calendar.prevYear = calendar.insertTbCell(trRow,0,"<<","center");
   calendar.prevYear.title="上一年";
   calendar.prevYear.onmousedown=function(){
    calendar.currentDate[0]--;
    calendar.show(calendar.target,calendar.currentDate[0]+"-"+calendar.currentDate+"-"+calendar.currentDate,calendar.source);
   }
   /*********** Calendar PrevMonth Button ***************/
   calendar.prevMonth = calendar.insertTbCell(trRow,1,"<","center");
   calendar.prevMonth.title="上一月";
   calendar.prevMonth.onmousedown=function(){