爱易网
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 浏览次数:20262 次
以下是程序代码
<!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() 函数来计算获得从某年到今天有多少时间
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
柳传志马云陷舆论漩涡:请不要辜负这个时代
众贷网满月开张 网络金融监管再受质疑
“扫黄打非”下9158否认遭整顿
传苹果与雅虎协作信息提供 进一步摆脱谷歌
去看看外面的世界吧!别窝里斗了,中国在线旅游商们
618首日看京东阿里不同策略,鹿死谁手?
金山毒霸安全中心: XP退役后首个高危漏洞来了
百度对糯米来说到底意味着什么?
首批四款“官方”打车软件发布:均为安卓版本
推荐阅读
更多>
Facebook以“人”为本的名义占领安卓
微软很“捉急”:补贴Win8 重加末尾按钮
支付宝全面封杀比特币:充值码淘宝店或遭封禁
电信运营商员工涌入虚拟运营商,待遇差距多大?
罗永浩工匠形象坍塌,锤子产能再跳水逃离用户超两成
史上最严电话实名制9月实行 三大难题待解
亚马逊第三方平台真的卖盗版书?
迅雷高管解读财报:收购快盘可快速融入小米
搜狐前副总编何毅加盟乐视 任车联网公司CEO
联想国庆完成收购IBM x86服务器
联想架构调整后:Think品牌或推智能手机
HTC的三大迷惘:高管釜底抽薪 产品营销战略混乱
三星已经将Galaxy S5视为失败之作?
亚马逊Fire Phone:请别拿我跟苹果三星比
十亿美元的告别礼:三星为何要大举重组?
Google要求硬件厂商捆绑预装应用的协议曝光
三星起诉LG在冰箱广告中玷污其企业笼统
微博启动自媒体计划 粉丝+收入双激励是亮点
墨迹天气:产品创新以攻为守方能对抗巨头
工信部或本月17日向联通电信颁发FDD牌照