大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 网页设计 -> 网页特效 -> 源码学习:一个简单的日历控件(8)

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

时间: 2021-07-31 作者:daque

  //************* 插入日子单位格 **************/  this.insertbodycell=function(therow,j,day,targetobject){   var thecell=therow.insertcell(j);   if(j==0) var thebgcolor="#ff9999";   else var thebgcolor="#ffffff";   if(day==calendar.currentdate[2]) var thebgcolor="#cccccc";   if(day==calendar.today[2]) var thebgcolor="#99ffcc";   thecell.bgcolor=thebgcolor;   thecell.innertext=day;   thecell.align="center";   thecell.width=35;   thecell.style.csstext="border:1 solid #cccccc;cursor:hand;";   thecell.onmouseover=function(){     thecell.bgcolor="#ffffcc";     thecell.style.csstext="border:1 outset;cursor:hand;";   }   thecell.onmouseout=function(){     thecell.bgcolor=thebgcolor;     thecell.style.csstext="border:1 solid #cccccc;cursor:hand;";   }   thecell.onmousedown=function(){     thecell.bgcolor="#ffffcc";     thecell.style.csstext="border:1 inset;cursor:hand;";   }   thecell.onclick=function(){    if(calendar.currentdate[1].length<2) calendar.currentdate[1]="0"+calendar.currentdate[1];    if(day.tostring().length<2) day="0"+day;    calendar.sltdate=calendar.currentdate[0]+"-"+calendar.currentdate[1]+"-"+day;    calendar.target.value=calendar.sltdate;    calendar.hide();   }  }  /************** 博得月份的第一天为礼拜几 *********************/  this.getfirstday=function(theyear, themonth){   var firstdate = new date(theyear,themonth-1,1);   return firstdate.getday();  }  /************** 博得月份公有几天 *********************/

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.