您好,欢迎来到模板无忧!
登录
注册
收藏
搜索
地图
帮助
模板无忧
网页特效
网页模板
CMS模板
PPT模板
简历模板
网页特效
视频教程
网页图标
字体下载
CMS教程
DivCss
网站制作
网站运营
网络编程
服务器
请选择您需要的素材分类 |
不限分类
每日更新
|
TOP排行榜
|
Tag标签
|
充值
无忧首页
网页模板
程序模板
建站教程
视频教程
网页特效
图标素材
字体下载
站长工具
站长问答
关闭顶部
展开顶部
网页特效
菜单导航
图片特效
文本链接
层和布局
页面背景
表单按钮
日期时间
计算转换
键盘鼠标
浏览器
游戏娱乐
综合其它
常用代码
jQuery特效
Prototype
Ajax/JavaScript
ExtJS
CSS特效
在线编辑器
Mootools
HTML
JS广告代码合集
站长工具
站长常用软件
网站综合查询
Alexa排名查询
Google PR查询
域名Whois查询
网站收录查询
友情链接查询
CSS2中文手册
CSS精简优化工具
AI小聚 能写会画
域名
推荐
展开边栏
关闭边栏
网页特效代码
模板无忧
>
网页特效
>
日期时间特效代码
>
收藏
分享
查看评论
日期时间
演示
一款漂亮的日历脚本_日期时间特效
0/5
1
2
3
4
5
查看演示效果
特效Tag:
日历
脚本
添加
织梦DedeCMS视频教程
买空间 租服务器 选网硕互联!
无忧站长工具,百度权重一键全查!
漂亮的脚本日历,您可以先修改部分代码再运行.
<Script LANGUAGE="JavaScript"> var months = new Array("一", "二", "三","四", "五", "六", "七", "八", "九","十", "十一", "十二"); var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31,30, 31, 30, 31); var days = new Array("日","一", "二", "三","四", "五", "六"); var classTemp; var today=new getToday(); var year=today.year; var month=today.month; var newCal; function getDays(month, year) { if (1 == month) return ((0 == year % 4) && (0 != (year % 100))) ||(0 == year % 400) ? 29 : 28; else return daysInMonth[month]; } function getToday() { this.now = new Date(); this.year = this.now.getFullYear(); this.month = this.now.getMonth(); this.day = this.now.getDate(); } function Calendar() { newCal = new Date(year,month,1); today = new getToday(); var day = -1; var startDay = newCal.getDay(); var endDay=getDays(newCal.getMonth(), newCal.getFullYear()); var daily = 0; if ((today.year == newCal.getFullYear()) &&(today.month == newCal.getMonth())) { day = today.day; } var caltable = document.all.caltable.tBodies.calendar; var intDaysInMonth =getDays(newCal.getMonth(), newCal.getFullYear()); for (var intWeek = 0; intWeek < caltable.rows.length;intWeek++) for (var intDay = 0;intDay < caltable.rows[intWeek].cells.length;intDay++) { var cell = caltable.rows[intWeek].cells[intDay]; var montemp=(newCal.getMonth()+1)<10?("0"+(newCal.getMonth()+1)):(newCal.getMonth()+1); if ((intDay == startDay) && (0 == daily)){ daily = 1;} var daytemp=daily<10?("0"+daily):(daily); var d="<"+newCal.getFullYear()+"-"+montemp+"-"+daytemp+">"; if(day==daily) cell.className="DayNow"; else if(intDay==6) cell.className = "DaySat"; else if (intDay==0) cell.className ="DaySun"; else cell.className="Day"; if ((daily > 0) && (daily <= intDaysInMonth)) { cell.innerText = daily; daily++; } else { cell.className="CalendarTD"; cell.innerText = ""; } } document.all.year.value=year; document.all.month.value=month+1; } function subMonth() { if ((month-1)<0) { month=11; year=year-1; } else { month=month-1; } Calendar(); } function addMonth() { if((month+1)>11) { month=0; year=year+1; } else { month=month+1; } Calendar(); } function setDate() { if (document.all.month.value<1||document.all.month.value>12) { alert("月的有效范围在1-12之间!"); return; } year=Math.ceil(document.all.year.value); month=Math.ceil(document.all.month.value-1); Calendar(); } </Script> <Script> function buttonOver() { var obj = window.event.srcElement; obj.runtimeStyle.cssText = "background-color:#FFFFFF"; // obj.className="Hover"; } function buttonOut() { var obj = window.event.srcElement; window.setTimeout(function(){obj.runtimeStyle.cssText = "";},300); } </Script> <Style> Input {font-family: verdana;font-size: 9pt;text-decoration: none;background-color: #FFFFFF;height: 20px;border: 1px solid #666666;color:#000000;} .Calendar {font-family: verdana;text-decoration: none;width: 170;background-color: #C0D0E8;font-size: 9pt;border:0px dotted #1C6FA5;} .CalendarTD {font-family: verdana;font-size: 7pt;color: #000000;background-color:#f6f6f6;height: 20px;width:11%;text-align: center;} .Title {font-family: verdana;font-size: 11pt;font-weight: normal;height: 24px;text-align: center;color: #333333;text-decoration: none;background-color: #A4B9D7;border-top-width: 1px;border-right-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-bottom-style:1px;border-top-color: #999999;border-right-color: #999999;border-bottom-color: #999999;border-left-color: #999999;} .Day {font-family: verdana;font-size: 7pt;color:#243F65;background-color: #E5E9F2;height: 20px;width:11%;text-align: center;} .DaySat {font-family: verdana;font-size: 7pt;color:#FF0000;text-decoration: none;background-color:#E5E9F2;text-align: center;height: 18px;width: 12%;} .DaySun {font-family: verdana;font-size: 7pt;color: #FF0000;text-decoration: none;background-color:#E5E9F2;text-align: center;height: 18px;width: 12%;} .DayNow {font-family: verdana;font-size: 7pt;font-weight: bold;color: #000000;background-color: #FFFFFF;height: 20px;text-align: center;} .DayTitle {font-family: verdana;font-size: 9pt;color: #000000;background-color: #C0D0E8;height: 20px;width:11%;text-align: center;} .DaySatTitle {font-family: verdana;font-size: 9pt;color:#FF0000;text-decoration: none;background-color:#C0D0E8;text-align: center;height: 20px;width: 12%;} .DaySunTitle {font-family: verdana;font-size: 9pt;color: #FF0000;text-decoration: none;background-color: #C0D0E8;text-align: center;height: 20px;width: 12%;} .DayButton {font-family: Webdings;font-size: 9pt;font-weight: bold;color: #243F65;cursor:hand;text-decoration: none;} </Style> <table border="0" cellpadding="0" cellspacing="1" class="Calendar" id="caltable"> <thead> <tr align="center" valign="middle"> <td colspan="7" class="Title"> <a href="javaScript:subMonth();" _fcksavedurl="javaScript:subMonth();" title="上一月" Class="DayButton">3</a> <input name="year" type="text" size="4" maxlength="4" onkeydown_fckprotectedatt="%20onkeydown%3D%22if%20(event.keyCode%3D%3D13)%7BsetDate()%7D%22" onkeyup_fckprotectedatt="%20onkeyup%3D%22this.value%3Dthis.value.replace(%2F%5B%5E0-9%5D%2Fg%2C'')%22" onpaste_fckprotectedatt="%20onpaste%3D%22this.value%3Dthis.value.replace(%2F%5B%5E0-9%5D%2Fg%2C'')%22"> 年 <input name="month" type="text" size="1" maxlength="2" onkeydown_fckprotectedatt="%20onkeydown%3D%22if%20(event.keyCode%3D%3D13)%7BsetDate()%7D%22" onkeyup_fckprotectedatt="%20onkeyup%3D%22this.value%3Dthis.value.replace(%2F%5B%5E0-9%5D%2Fg%2C'')%22" onpaste_fckprotectedatt="%20onpaste%3D%22this.value%3Dthis.value.replace(%2F%5B%5E0-9%5D%2Fg%2C'')%22"> 月 <a href="JavaScript:addMonth();" _fcksavedurl="JavaScript:addMonth();" title="下一月" Class="DayButton">4</a> </td> </tr> <tr align="center" valign="middle"> <Script LANGUAGE="JavaScript"> document.write("<TD class=DaySunTitle id=diary >" + days[0] + "</TD>"); for (var intLoop = 1; intLoop < days.length-1;intLoop++) document.write("<TD class=DayTitle id=diary>" + days[intLoop] + "</TD>"); document.write("<TD class=DaySatTitle id=diary>" + days[intLoop] + "</TD>"); </Script> </TR> </thead> <TBODY border=1 cellspacing="0" cellpadding="0" ID="calendar" ALIGN=CENTER ONCLICK="getDiary()"> <Script LANGUAGE="JavaScript"> for (var intWeeks = 0; intWeeks < 6; intWeeks++) { document.write("<TR style='cursor:hand'>"); for (var intDays = 0; intDays < days.length;intDays++) document.write("<TD class=CalendarTD onMouseover='buttonOver();' onMouseOut='buttonOut();'></TD>"); document.write("</TR>"); } </Script> </TBODY> </TABLE> <Script LANGUAGE="JavaScript"> Calendar(); </Script>
所属频道:
日期时间特效
/
更新时间:2012-05-22
[收藏]
[报错]
[返回列表]
评论加载中....
相关
日期时间特效
:
柱状时钟
计算圆周率
随机数据显示功能、选号器
层时钟
跟随时钟
在线日历
一个倒记时
显示登陆时间
知道两点的坐标计算机出他们之间的距离
跟随鼠标的时钟
日期时间信息 Script
世界人口计算器!有一定的科学性
日期时间特效Rss订阅
特效代码搜索
日期时间特效推荐
阴阳日历对照表
完整日期
当你打开页面时根据当前的时间出现相应的问候语
超酷两百年日历
JS倒计时代码
Js博客日历控件
坐标图
新款万年历
时钟加在背景上
JavaScript进行日期计算的示例
猜你也喜欢看这些
Javascript字符过滤代码
JavaScript长度单位互相转换
手机号码抽奖程序
好酷的球体下坠碰撞弹跳特效
将英文单词开头字母转换为大写的JavaScript
JS转换为HTML代码
计算文本框允许输入字符的百分比
JavaScript按规定截取字符串(获取邮箱用户名)
网页加密程序,基于JavaScript
JavaScript在线考试系统
相关链接:
复制本页链接
|
搜索一款漂亮的日历脚本
特效说明:
日期时间模板
-
一款漂亮的日历脚本
。
收藏&分享
QQ空间
新浪微博
腾讯微博
人人网
开心网
百度搜藏
复制网址
更多...