爱易网
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特效
原生JS制作双月份显示效果的日历月历特效代码
原生JS制作双月份显示效果的日历月历特效代码
日期:2014-05-18 浏览次数:20267 次
以下是程序代码
<!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>原生JS写的日历月历 - demo by js.aiyiweb.com</title> <style type="text/css"> <!-- body {font-size: 14px;line-height: 20px;margin: 0px;padding: 0px;text-align:center;font-family: Arial;} #overlay{position:absolute;z-index:999;top:0;left:0;width:100%;height:100%;background:#000;opacity:0.3;filter:alpha(opacity=30);display:none;} #win{position:absolute;z-index:999;top:50%;left:50%;width:400px;height:200px;background:rgba(00, 00, 00, 0.5);margin:-100px 0 0 -200px;display:none;} #win #otitle{color:#fff;height:33px;padding-left:10px;text-align:left;background:rgba(00, 00, 00, 0.7);} #win #otitle #otitlestr {float:left;width:200px;height:30px;line-height:30px;} #win #otitle #close {font-size:24px;width:33px;height:33px;line-height:33px;text-align:center;font-weight:bold;float:right;cursor:pointer;} #win #showstr {color:#fff;margin:10px;text-align:left;} .clear{clear: both;} em{font-style: normal;} ul,li{list-style-type: none;margin:0px;padding:0px;} #newDate{width:1230px;height:auto;margin:35px auto 0 auto;} #newDate #nowDate{width:600px;height:600px;float:left;cursor:pointer;} #newDate #nextDate{width:600px;height:600px;float:right;cursor:pointer;} #newDate .Header{width:594px;height:50px;background:#e6dcda;border-bottom-width: 1px;border-bottom-style: solid;border-bottom-color: #FFF;position:relative;-moz-user-select:none;-webkit-user-select:none;user-select:none; } #newDate .c{font-size:24px;font-weight:bold;height:50px;line-height:50px;text-align:center;} #newDate .l{font-size:24px;font-weight:bold;height:50px;line-height:50px;position:absolute; top:0px; left:14px;} #newDate .r{font-size:24px;font-weight:bold;height:50px;line-height:50px;position:absolute; top:0px; right:14px;} #newDate .Weeks{width:595px;height:30px;} #newDate span{font-weight:bold;width:84px;height:30px;line-height:30px;text-align:center;background:#e6dcda;margin-right:1px;float:left;} #newDate ul li{color:#999;font-size:24px;width:84px;height:70px;line-height:70px;text-align:center;margin-top:1px;margin-right:1px;background:#f5f5f5;float:left;} --> </style> <!--[IF lt IE 9]> <style> #win,#win #otitle{filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#7f000000,endColorstr=#7f000000);} </style> <![endif]--> <script type="text/javascript"> window.onload = function(){ function $(id){return typeof id === "string" ? document.getElementById(id) : id;} function lightBoxShow(title,str) { var oWin = $("win"); var oLay = $("overlay"); $("otitlestr").innerHTML = title; $("showstr").innerHTML = str; oLay.style.display = "block"; oWin.style.display = "block"; $("close").onclick = function () { oLay.style.display = "none"; oWin.style.display = "none" } } var newDate = document.getElementById("newDate"); var nowDate = document.getElementById("nowDate"); var nextDate = document.getElementById("nextDate"); var nDate = new Date(); if(nDate.getMonth()+1==12){ viewDate(nowDate,nDate.getFullYear(),nDate.getMonth()+1,true); viewDate(nextDate,nDate.getFullYear()+1,1); }else{ viewDate(nowDate,nDate.getFullYear(),nDate.getMonth()+1,true); viewDate(nextDate,nDate.getFullYear(),nDate.getMonth()+2); } showBtn(); function viewDate(obj,year,mont
上一篇:狡猾的按钮特效
下一篇:教你使用getTime() 函数来计算获得从某年到今天有多少时间
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
只有切到刚需痛点,漫画APP才能走下去
从雷军的“互联网七字诀”告诉你一个非妖魔化的小米
金山毒霸安全中心: XP退役后首个高危漏洞来了
微信企业号必须搬走四座大山,否则只能铩羽而归!
苹果已经允许开发者提交64位应用程序
迅雷欲3300万美元收购金山快盘 预计9月完成
首家国有独资P2P平台上线 或预示政策日渐明朗
小米发明的“低价抢购”模式还能管用多久?
苹果股价突破100美元大关:投资者看好iPhone 6
推荐阅读
更多>
苹果股价突破100美元大关:投资者看好iPhone 6
中电信率先推移动转售业务 中下旬批量上市
二代 iPad Air将配备2GB内存?为同屏多任务做准备
传诺基亚Lumia928下月推出 将与iPhone5看齐
阿里国际化再落子:2.49亿美元投资新加坡邮政
运营商补贴减少 国内通信业拐点逼近
让一让,小米4来了,碰见米粉请务必绕道走!
Google要求硬件厂商捆绑预装应用的协议曝光
王建宙解构OTT效劳 中移动重塑飞信平台
京东终于想明白,这些年错过的财运,都藏在女人的时装下
同程旅游融资后变土豪 如何烧钱占领市场?
中国雅虎邮箱今日关停 由盛及衰的背后
华为野心布局未来:投资研发5G对赌1毫秒连接
阿里马云:我觉得互联网还有十年可以做
搜房网遭遇做空 利益保送成“猎杀”焦点
小灵通两年都无信号 顾客起诉联通公司
阿里巴巴450亿勾画“现代服务业”藏宝图
网友爆料称微软雇水军宣传主机Xbox One
雅安地震救灾前线的科技之手 微弱而暖和
奇虎360证明了“惟平台化才能生存”是谬论,中国互联网不能少了周鸿祎