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

HTML/XHTML教程
使用Web标准建站第5天:head区的其他设置
使用Web标准建站第4天:调用样式表
使用Web标准建站第3天:定义语言编码
使用Web标准建站第2天:什么是名字空间
使用Web标准建站第1天:选择什么样的DOCTYPE
使用Web标准建站第12天:校验及常见错误
使用Web标准建站第11天:不用表格的菜单
使用Web标准建站第10天:自适应高度
实现网页渐入特殊效果
实现网页的动态过渡效果
让网页里的提交按钮变得更靓丽
让浏览者记住你的主页
批量消除超链接虚线框
精彩网页九“慎”
解析HTML的增强标记
简单实用的网页表格特效
几个对图形进行动态处理的dhtml代码
基于Web标准的UI组件 — 菜单(1)
关于iframe的透明背景
shtml网页SSI使用详解

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


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