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

HTML/XHTML教程
通过W3C XHTML1.0及CSS标准必须注意的九个问题
注意这11个问题保证CSS的渲染效率
用css+js定义input_file元素的样式来兼容FireFox
CSS技巧:如何使未知高宽的图片实现垂直居中
CSS基础教程:布局网页技巧的完全学习手册
css知识:Div和Span在使用中的不同之处
css技巧:批量保存div+css网页中的图片的几种方法
CSS技巧:常用的属性代码简化表
介绍二款b/s开发中常用小工具
css教程:IE6、IE7和FF的hack的运用技巧
Google改进SSL机制,控制SSL安全机制存漏洞
css技巧:分享9个网页制作常用技巧
规范Web站点设计css类以及id的命名方式
html教程:WEB标准从头开始_DOCTYPE声明
html/css教程:背景图片的定位问题详解
CSS教程:自动隐藏网页文字的技巧
汇总一些IE与Firefox的CSS兼容问题及解决办法
网页中利用Title属性的好处
40多个漂亮的网页表单设计实例
制作商业HTML邮件的建议

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


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