爱易网
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 浏览次数:20228 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<!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
上一篇:狡猾的按钮特效
下一篇:网页中实用的中英文日历网页特效代码
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
苹果股价突破100美元大关:投资者看好iPhone 6
中移动本月推手机钱包 iPhone遭边缘化
曹国伟:微博将关注Facebook和Twitter
陈天桥之鉴:产品创新被扼杀那些事
这一次,微软将带给我们什么惊喜?
美图手机2问世 三大问题令其市场销量堪忧
中电信率先推移动转售业务 中下旬批量上市
京东封杀财付通:终极目标是电商生态圈
京东联席董事长赵国庆上市前夕离职
推荐阅读
更多>
淘宝公布新规:升级售假卖家惩罚力度
二维码支付大战的号角注定已经吹响,尚需标准发放
QQ空间与微信龟兔赛跑,商业生态链陷入死循环
喜大普奔:2016年国内乘客有望在飞机上使用手机
京东联席董事长赵国庆上市前夕离职
微信将商场O2O战火烧到了阿里巴巴老家
看,网络文学今日之繁盛;忆,纯真去哪了?
优酷土豆兼并一年:依然处于烧钱形状
阿里国际化再落子:2.49亿美元投资新加坡邮政
英特尔技术高管离任 电视业务或受影响
八位知名设计师评iOS7:新鲜但复杂
中国首台比特币ATM登陆上海 可购买不可兑换现钞
传苹果已告知鸿海:两款新iPhone下月发货
iOS7拖累iPad 5、iPad mini2发布 传十月份推出
iPhone5S组件曝光 印证杀手级功能存在
中移动本月推手机钱包 iPhone遭边缘化
广电总局回应美剧下架:不是所有信息可公开
中移动将推出多项4G资费新政
富士康欲用机器人产iPhone 6
阿里收购UC 五年姻缘换来移动新格局