爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
日期选择填写脚本
日期选择填写脚本
日期:2014-05-18 浏览次数:20135 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
要完成此效果需要两个步骤 第一步:把如下代码加入到<head>区域中 <script> var weekend = [0,6]; var weekendColor = "#e0e0e0"; var fontface = "Verdana"; var fontsize = 2; var gNow = new Date(); var ggWinCal; isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false; isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false; Calendar.Months = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]; // Non-Leap year Month days.. Calendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; // Leap year Month days.. Calendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; function Calendar(p_item, p_WinCal, p_month, p_year, p_format) { if ((p_month == null) && (p_year == null)) return; if (p_WinCal == null) this.gWinCal = ggWinCal; else this.gWinCal = p_WinCal; if (p_month == null) { this.gMonthName = null; this.gMonth = null; this.gYearly = true; } else { this.gMonthName = Calendar.get_month(p_month); this.gMonth = new Number(p_month); this.gYearly = false; } this.gYear = p_year; this.gFormat = p_format; this.gBGColor = "white"; this.gFGColor = "black"; this.gTextColor = "black"; this.gHeaderColor = "black"; this.gReturnItem = p_item; } Calendar.get_month = Calendar_get_month; Calendar.get_daysofmonth = Calendar_get_daysofmonth; Calendar.calc_month_year = Calendar_calc_month_year; Calendar.print = Calendar_print; function Calendar_get_month(monthNo) { return Calendar.Months[monthNo]; } function Calendar_get_daysofmonth(monthNo, p_year) { /* Check for leap year .. 1.Years evenly divisible by four are normally leap years, except for... 2.Years also evenly divisible by 100 are not leap years, except for... 3.Years also evenly divisible by 400 are leap years. */ if ((p_year % 4) == 0) { if ((p_year % 100) == 0 && (p_year % 400) != 0) return Calendar.DOMonth[monthNo]; return Calendar.lDOMonth[monthNo]; } else return Calendar.DOMonth[monthNo]; } function Calendar_calc_month_year(p_Month, p_Year, incr) { /* Will return an 1-D array with 1st element being the calculated month and second being the calculated year after applying the month increment/decrement as specified by 'incr' parameter. 'incr' will normally have 1/-1 to navigate thru the months. */ var ret_arr = new Array(); if (incr == -1) { // B A C K W A R D if (p_Month == 0) { ret_arr[0] = 11; ret_arr[1] = parseInt(p_Year) - 1; } else { ret_arr[0] = parseInt(p_Month) - 1; ret_arr[1] = parseInt(p_Year); } } else if (incr == 1) { // F O R W A R D if (p_Month == 11) { ret_arr[0] = 0; ret_arr[1] = parseInt(p_Year) + 1; } else { ret_arr[0] = parseInt(p_Month) + 1; ret_arr[1] = parseInt(p_Year); } } return ret_arr; } function Calendar_print() { ggWinCal.print(); } function Calendar_calc_month_year(p_Month, p_Year, incr) { /* Will return an 1-D array with 1st element being the calculated month and second being the calculated year after applying the month increment/decrement as specified by 'incr' parameter. 'incr' will normally have 1/-1 to navigate thru the months. */ var ret_arr = new Array(); if (incr == -1) { // B A C K W A R D if (p_Month == 0) { ret_arr[0] = 11; ret_arr[1] = parseInt(p_Year) - 1; } else { ret_arr[0]
上一篇:狡猾的按钮特效
下一篇:超酷时钟
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
众贷网满月开张 网络金融监管再受质疑
乐视今日临时停牌 受广电酝酿新规消息影响
打车软件竞争白热化:有冷兵器时代意味
HTC以品牌营销突围 专家建议改变经营思路
Twitter收购印度手机营销公司ZipDial
传苹果中移动达成协议:新iPhone兼容TD制式
三星维修新规:Galaxy S4主板进水也收费修
小米发明的“低价抢购”模式还能管用多久?
苹果30亿美元收购Beats
推荐阅读
更多>
创维冲击500亿梦想:转型硬件和内容供应商
宽带中国战略明确 运营商建设成本超6000亿
戴尔正告继续上市存风险 称黑石伊坎方案有缺乏
云智慧:用大数据实现企业应用性能管理
广电总局回应美剧下架:不是所有信息可公开
全球网络遭史上最大规模攻击:攻击数据每秒300G
看蜗牛如何放水养鱼,盘活生态系统
亚马逊第三方平台真的卖盗版书?
“宽带中国”计划已正式上升为国家战略
评论:阿里为什么不试着收购一家香港媒体呢
欧洲6万人起诉Facebook隐私侵权
固话上网卡或将实名制 运营商泄露用户信息将被罚
摩托罗拉中国区将再裁员 助力公司变身
公信力消失:马航事件社交媒体传播之痛
支付宝服务窗后台首曝光 开放用户消费数据
诺基亚仍是第二大手机商:功用机有利可图
史上最严电话实名制9月实行 三大难题待解
英特尔技术高管离任 电视业务或受影响
杨元庆去年总薪酬1.33亿元
首个释放出搅局房地产信号的互联网公司不是小米而是58同城