a 设为首页
a 加入收藏
a 联系我们
a     本站诚征友情链接!!!  [admin  2007年11月22日]         今天是
 | 网站首页 | 站长在线 | 新闻资讯 | 网页设计 | 平面设计 | 网络媒体 | 网络安全 | 服务器 | 软件下载 | 图片素材 | 在线商城 | 站长论坛 | 留言 | 繁體中文
热门搜索关键字: 模板 | 错误 | 标签 | 采集 | 数据库 | 组件 | 代码 | 特效 | 木马 | 插件 | 虚拟主机
栏目导航  
ASPNET
JspPhp
HTMLCSS
网页配色
网页特效
Frontpage
Dreamweaver
其他相关
专题栏目  
· 网络架设  · 病毒安全
· 图行天下  · 音影视听
· 动易软件  · 动网软件
· 虚拟组合  · SEO技术
推荐文章  
热门文章  
图片文章  
 
您现在的位置: 中国站长在线|ITE258 >> 网页设计 >> 网页特效 >> 正文
源码学习:一个简单的日历控件(8)
文章来源:不详 点击数: 更新时间:2007-7-4 【字体:




  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
     
    关于〖源码学习:一个简单的日历控件(8)〗的最新评论:
      //************* 插入日期单元格 **************/
      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();
      }
      /************** 取得月份共有几天 *********************/
    | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 管理登录 | 
    中国站长在线 http://www.ite258.com 电子邮件:ite258@126.com
    点击给站长发消息!站长QQ群: 15643723
    湘ICP备07501014号
    站长:梦天 Copyright (c) 2002-2008 ite258.com. All Rights Reserved.
    本站部分资源由网友推荐,来自互联网,版权属于原版权人,如果不慎侵犯到您的权利,敬请告知,我们会在第一时间撤除。
    本站中各网友的评论只代表其个人观点,不代表本站同意其观点。