爱易网
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 浏览次数:20199 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
要完成此效果需要两个步骤 第一步:把如下代码加入到<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]
上一篇:狡猾的按钮特效
下一篇:超酷时钟
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
广东移动高层受调查 中移动或现更大反腐风暴
挂号网高管团体离任 或因投资人失掉决计
苹果MacBook Air劣势渐显 或推新产品改变命运
传诺基亚5月14日发布会推出Lumia 950
都是300元内 乐视盒子与小米盒子对比体验
第二梯队也PK:当1号店“遇上”京东手机节
如家撤离同程内情:祸起反水OTA“联盟”?
历史惊人相似:如今的库克 曾经的鲍尔默
京东很忙:升服务推产品更新招股书 能赶在阿里前上市?
推荐阅读
更多>
百度透露无人驾驶战略 研发三维交通地图
这一次,微软将带给我们什么惊喜?
HTC的三大迷惘:高管釜底抽薪 产品营销战略混乱
易信工具性优势突出 丁磊三板斧或先砍在飞信上
独立工具APP:为亿级用户的商业化而愁
公信力消失:马航事件社交媒体传播之痛
网易微博将正式关闭 用户迁至轻博客LOFTER
苹果股价突破100美元大关:投资者看好iPhone 6
欧盟控诉苹果在爱尔兰非法进行税收交易
不提老罗,不说情怀,仅从十四个投诉问题入手谈锤子手机
阿里收购UC 五年姻缘换来移动新格局
虚拟运营商前路迷茫 业界建议发力车联网
一个非脑残米粉的思考:小米“成功之道”如何炼成
微信将商场O2O战火烧到了阿里巴巴老家
安全服务机构:公布2014年度最糟糕的25个密码
国美痛批网购七宗罪 用短暂盈利输了未来
地图导航骤起杀机 百度高德重新定义商业模式
易迅大众点评缩水执行“七天后悔权”被约谈
微信企业号必须搬走四座大山,否则只能铩羽而归!
小米2S试水高端化 纯“性价比”玩法已成过去式