爱易网
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 浏览次数:20236 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> JS 日历aiyiweb.com </title> <meta name="author" content="网页教学网"> <meta name="keywords" content="js日历,calender"> <meta name="description" content="js日历"> <script type="text/javascript"> function HS_DateAdd(interval,number,date){ number = parseInt(number); if (typeof(date)=="string"){var date = new Date(date.split("-")[0],date.split("-")[1],date.split("-")[2])} if (typeof(date)=="object"){var date = date} switch(interval){ case "y":return new Date(date.getFullYear()+number,date.getMonth(),date.getDate()); break; case "m":return new Date(date.getFullYear(),date.getMonth()+number,checkDate(date.getFullYear(),date.getMonth()+number,date.getDate())); break; case "d":return new Date(date.getFullYear(),date.getMonth(),date.getDate()+number); break; case "w":return new Date(date.getFullYear(),date.getMonth(),7*number+date.getDate()); break; } } function checkDate(year,month,date){ var enddate = ["31","28","31","30","31","30","31","31","30","31","30","31"]; var returnDate = ""; if (year%4==0){enddate[1]="29"} if (date>enddate[month]){returnDate = enddate[month]}else{returnDate = date} return returnDate; } function WeekDay(date){ var theDate; if (typeof(date)=="string"){theDate = new Date(date.split("-")[0],date.split("-")[1],date.split("-")[2]);} if (typeof(date)=="object"){theDate = date} return theDate.getDay(); } function HS_calender(){ var lis = ""; var style = ""; /*可以把下面的css剪切出去独立一个css文件aiyiweb.com*/ style +="<style type='text/css'>"; style +=".calender { width:170px; height:auto; font-size:12px; margin-right:14px; background:url(calenderbg.gif) no-repeat right center #fff; border:1px solid #397EAE; padding:1px}"; style +=".calender ul {list-style-type:none; margin:0; padding:0;}"; style +=".calender .day { background-color:#EDF5FF; height:20px;}"; style +=".calender .day li,.calender .date li{ float:left; width:14%; height:20px; line-height:20px; text-align:center}"; style +=".calender li a { text-decoration:none; font-family:Tahoma; font-size:11px; color:#333}"; style +=".calender li a:hover { color:#f30; text-decoration:underline}"; style +=".calender li a.hasArticle {font-weight:bold; color:#f60 !important}"; style +=".lastMonthDate, .nextMonthDate {color:#bbb;font-size:11px}"; style +=".selectThisYear a, .selectThisMonth a{text-decoration:none; margin:0 2px; color:#000; font-weight:bold}"; style +=".calender .LastMonth, .calender .NextMonth{ text-decoration:none; color:#000; font-size:18px; font-weight:bold; line-height:16px;}"; style +=".calender .LastMonth { float:left;}"; style +=".calender .NextMonth { float:right;}"; style +=".calenderBody {clear:both}"; style +=".calenderTitle {text-align:center;height:20px; line-height:20px; clear:both}"; style +=".today { background-color:#ffffaa;border:1px solid #f60; padding:2px}"; style +=".today a { color:#f30; }"; style +=".calenderBottom {clear:both; border-top:1px solid #ddd; padding: 3px 0; text-align:left}"; style +=".calenderBottom a {text-decoration:none; margin:2px !important; font-weight:bold; color:#000}"; style +=".calenderBottom a.closeCalender{float:right}"; style +=".closeCalenderBox {float:right; border:1px solid #000; background:#fff; font-size:9px; width:11px; height:11px; line-height:11px; text-align:center;overflow:hidden; font-weight:normal !important}"; style +="</style>"; var now; if (typeof(arguments[0])=="string"){ selectDate = arguments[0].split("-"); var year = selectDate[0]; va
上一篇:狡猾的按钮特效
下一篇:网页中实用的中英文日历网页特效代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
百度对糯米来说到底意味着什么?
想玩P2P?几个您必须知道的潜规则
传诺基亚Lumia928下月推出 将与iPhone5看齐
App Store严禁推送广告 运用面临大清洗
Android应用审核乱象:诈骗软件冲上排行榜首
墨迹天气:产品创新以攻为守方能对抗巨头
神奇约炮应用被禁 改名后重返苹果应用商店
HDS发布《2013中国CIO洞察白皮书》
频繁自杀 折射媒体变革中的媒体人迷茫与压力并存
推荐阅读
更多>
IT企业人才争夺战打响:员工待遇水涨船高
微软张亚勤趋势判断:未来三十年属于物理化互联网
史玉柱卸任巨人网络CEO 继位人选引猜想
摩托罗拉中国区将再裁员 助力公司变身
迅雷高管解读财报:收购快盘可快速融入小米
首家国有独资P2P平台上线 或预示政策日渐明朗
搜房网遭遇做空 利益保送成“猎杀”焦点
iOS7拖累iPad 5、iPad mini2发布 传十月份推出
前苹果顾问批判iPhone命名:不应加S
猎豹移动上市押海外市场 与小米有合作空间
银河证券王锦炎:金融业如何使用大数据
公信力消失:马航事件社交媒体传播之痛
黑莓高管:黑莓能作为家“小众公司”活下来
柳传志马云陷舆论漩涡:请不要辜负这个时代
从百度世界大会看大数据
苹果售后生态链乱象:供需失衡价钱不一
苹果MacBook Air劣势渐显 或推新产品改变命运
亚马逊推特价闪购纪念入华十周年 总裁一职仍空缺
扎克伯格华裔妻子首度亮相电视节目畅谈情史
568倍PE,“长跑者”亚马逊的高估值之谜