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

HTML/XHTML教程
初学web标准的几个误区
表格对决CSS--一场生死之战
XHTML基础问答-给初学者
XHTML基础问答
XHTML 1.0
META标签的奥妙
IE支持的html元素的disable在netscape4.76中的实现
HTML组件(HTML COMPONENTS)之十一
HTML组件(HTML COMPONENTS)之十
HTML组件(HTML COMPONENTS)之九
HTML中的图象标签属性
HTML中的表格元素
HTML中Access Key(存取键)的用法
HTML之字体标记
HTML之影像地图
HTML之图形标记
HTML之特殊字符
HTML之清单标记
使用Web标准建站第7天:CSS入门
使用Web标准建站第6天:XHTML代码规范

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-04   浏览: 60 ::
收藏到网摘: 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(){