源码学习:一个简单的日历控件(4)

控件|日历

  }

   trRow = tbBoard.insertRow(2);
   var cnDateName = new Array("周日","周一","周二","周三","周四","周五","周六");
   for (var i = 0; i < 7; i++) {
    tbCell=trRow.insertCell(i)
    tbCell.innerText=cnDateName[i];
    tbCell.align="center";
    tbCell.width=35;
    tbCell.style.cssText="cursor:default;border:1 solid #99CCCC;background-color:#99CCCC;";
   }

   /*********** Calendar Body ***************/
   trRow = tbBoard.insertRow(3);
   tbCell=trRow.insertCell(0);
   tbCell.colSpan=7;
   tbCell.height=97;
   tbCell.vAlign="top";
   tbCell.bgColor="#F0F0F0";
   var tbBody=document.createElement("table");
   tbCell.insertAdjacentElement("beforeEnd",tbBody);
   tbBody.style.cssText="position:relative;top:0;left:0;width:245;height:103;font-size:9pt;"
   tbBody.cellPadding=0;
   tbBody.cellSpacing=1;
   calendar.body=tbBody;
  }
  /************** 加入功能按钮公共样式 *********************/
  this.insertTbCell=function(trRow,cellIndex,TXT,trAlign,tbColSpan){
   var tbCell=trRow.insertCell(cellIndex);
   if(tbColSpan!=undefined) tbCell.colSpan=tbColSpan;

   var btnCell=document.createElement("button");
   tbCell.insertAdjacentElement("beforeEnd",btnCell);
   btnCell.value=TXT;
   btnCell.style.cssText="width:100%;border:1 outset;background-color:buttonface;";
   btnCell.onmouseover=function(){
    btnCell.style.cssText="width:100%;border:1 outset;background-color:#F0F0F0;";

时间: 2024-08-18 08:18:45

源码学习:一个简单的日历控件(4)的相关文章

源码学习:一个简单的日历控件

控件|日历 calendar.js    function atCalendarControl(){  var calendar=this;  this.calendarPad=null;  this.prevMonth=null;  this.nextMonth=null;  this.prevYear=null;  this.nextYear=null;  this.goToday=null;  this.calendarClose=null;  this.calendarAbout=nul

源码学习:一个简单的日历控件(6)

控件|日历    if(defaultDate==undefined || defaultDate==""){    var theDate=new Array();    calendar.head.innerText = calendar.today[0]+"-"+calendar.today+"-"+calendar.today;    theDate[0]=calendar.today[0]; theDate=calendar.today

源码学习:一个简单的日历控件(5)

控件|日历    }   btnCell.onmouseout=function(){    btnCell.style.cssText="width:100%;border:1 outset;background-color:buttonface;";   }  // btnCell.onmousedown=function(){  //  btnCell.style.cssText="width:100%;border:1 inset;background-color:#

源码学习:一个简单的日历控件(3)

控件|日历     calendar.currentDate--;    if(calendar.currentDate==0){     calendar.currentDate=12;     calendar.currentDate[0]--;    }    calendar.show(calendar.target,calendar.currentDate[0]+"-"+calendar.currentDate+"-"+calendar.currentDa

源码学习:一个简单的日历控件(2)

控件|日历    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=

源码学习:一个简单的日历控件(1)

控件|日历   calendar.js    function atCalendarControl(){  var calendar=this;  this.calendarPad=null;  this.prevMonth=null;  this.nextMonth=null;  this.prevYear=null;  this.nextYear=null;  this.goToday=null;  this.calendarClose=null;  this.calendarAbout=n

写一个简单的登陆控件

控件 login.ascx 由于在页面上很频繁使用登陆,把它做成一个控件是很有必要的,下面就是我写的一个简单的登陆控件,大家可以根据的需要完善一下. <%@ Import Namespace="System.Data" %><%@ Import Namespace="System.Data.Oledb" %><script language="VB" runat="server">Sub P

翻翻git之---一个简单的标签控件 LabelView (随手发了两张小宝宝的玩耍照)

转载请注明出处:王亟亟的大牛之路 P1:这部分为废话技术内容在P2,不想看的可跳过 最近每天都是在照顾鱼,麦麦,当当之间游离回家几乎没学习,没敲代码,或者说没开工作电脑,慢慢的罪恶感,贴两张周末小朋友们玩耍的照片 但是生活还是很重要的,不能让自己成为赚钱的工具,毕竟赚的不多...那如果赚的不多,那更要过的开心了.青春啊!!! P2 今天介绍的是一个国内小伙伴的一个标签库,这一类的实现之前也有写过,但是还是推荐下这位大牛的,理由? 因为看得舒服. 效果图: How to use? 大牛没有做Gra

求助:谁帮我做一个C#自定义日历控件 有报酬

问题描述 这样既可有谁帮一下谢谢jiaQQ578304638 解决方案 解决方案二: 解决方案三:网上很多事例,搜一个