爱易网
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 浏览次数:20231 次
以下是程序代码
<!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() 函数来计算获得从某年到今天有多少时间
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
从百度世界大会看大数据
巨人网络回应央视 否认应用黑客停止诈骗
传诺基亚Lumia928下月推出 将与iPhone5看齐
谷歌新技术进入iOS平台:将叫板苹果Siri
史上最严电话实名制9月实行 三大难题待解
网络视频的几大趋势将成视频玩家躲不开的发力点
华为野心布局未来:投资研发5G对赌1毫秒连接
诺基亚因充电器问题暂停销售Lumia 2520平板电脑
9月1日起免征新能源汽车购置税
推荐阅读
更多>
【晚报】女子泰国游晒10照片 流量费2000
网易云音乐能否为丁磊拿到移动互联网门票?
探析APP移动营销发扬实效的微妙
NoomWeight减肥
智能手机:中国手机市场最受关注十五款产品清点
苹果联合创始人炮轰鲍尔默“一直都在吃老本”
全球最具“颠覆性”特质的公司排行榜TOP25
谁说黑莓没救?他们在悄悄地深耕企业级市场,在这个领域,苹果三星算什么,他们远远不是黑莓的对手
摩托罗拉中国区将再裁员 助力公司变身
盘点改变社会的15种科技:谷歌眼镜将使我们成为半机械人
揭秘:阿里巴巴“无人认领”的三成股权都归谁
传360周鸿祎曾试图阻止百度收购91无线
刘强东:京东上市融资用于开拓三至六线城市
评论:阿里为什么不试着收购一家香港媒体呢
诺基亚再缩阵线 封锁上海旗舰店全力蜕变
微软觊觎移动互联市场:手机未出渠道先行
一个非脑残米粉的思考:小米“成功之道”如何炼成
任正非:华为决不上市 上市公司股东贪婪而短视
马云自称在美国曾被绑票
微软为避免代理权争夺 与大股东达成和解协议