爱易网
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 浏览次数:20123 次
css用了expression,若放在有较多内容的页面里,会影响页面加载和运行速度
以下是HTML网页特效代码,点击运行按钮可查看效果:
以下是程序代码
<base href=http://www.aiyiweb.com > <style> .cal_0 table{ border:none; font-family:tahoma; font-size:9px; text-align:center; } .cal_0 th{ height:17; background-image:expression("url("+MyCal.color+"_h.gif)"); border-bottom:expression("1 solid "+MyCal.ca); } .cal_0{ background-image:url(shadow.gif); width:168; height:131; cursor:default; padding:3 4 5 3; position:absolute; } .cal_1{ border:expression("1 solid "+MyCal.ca); width:100%; height:100%; } .d1{ position:absolute; color:expression(MyCal.cb); font-size:96px; font-family:Arial black; font-weight:bolder; left:0; top:-9; width:160; text-align:center; overflow:hidden; z-index:-1; } .d5{ position:absolute; left:45; top:108; width:60; height:13; } .d6{ position:absolute; left:108; top:108; width:48; height:13; } .cc{ border-color:expression(MyCal.ca); border-width:1; border-style:solid; line-height:9px; } .sel{ position:absolute; border-top:none; top:121; height:135; overflow:hidden; background-color:white; overflow-y:auto; display:none; } .selitem{ font-family:tahoma; font-size:9px; line-height:11px; text-align:left; } .p1{ padding-left:19; } .p2{ padding-left:16; } .scroll{ scrollbar-3dlight-color:expression(MyCal.ca); scrollbar-arrow-color:white; scrollbar-face-color:white; scrollbar-shadow-color:white; scrollbar-track-color:white; } </style> <script> MyCal.color="green"; MyCal.ca="#99cc00"; MyCal.cb="#e5f5e5"; function MyCal(numYear,numMonth,numDate){ if(typeof(oMain)!='undefined'){ alert("one instance of MyCal per page only") return null; } var arg=MyCal.arguments; if(arg.length==3){ this.year=arg[0]; this.month=arg[1]; this.date=arg[2]; } else{ var t=new Date(); this.year=t.getYear(); this.month=t.getMonth(); this.date=t.getDate(); } this.green=["#99cc00","#e5f5e5"]; this.blue=["#00ccff","#e5eff5"]; this.yellow=["#ffcc00","#ffefef"]; this.gray=["#999999","#f0f0f0"]; this.DayName="Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","); this.MonthDay=[[31,28,31,30,31,30,31,31,30,31,30,31],[31,29,31,30,31,30,31,31,30,31,30,31]]; this.MonthName="Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","); for(var i in this.MonthName) this.MonthName[this.MonthName[i]]=i; this.setColor=function(str){ if(typeof(this[str])=="undefined"){ alert("no such color:"+str); return; } if(typeof(oYear)!="undefined"){ var t=document.all("imgArr"); for(var i=0;i<t.length;i++) t[i].src=t[i].src.replace(MyCal.color,str); } MyCal.color=str; MyCal.ca=this[str][0]; MyCal.cb=this[str][1]; } this.chgYear=function(d){ var m=oYear.innerText; this.year=parseInt(m)+d; this.refresh(); } this.chgMonth=function(d){ var i=parseInt(this.MonthName[oMonth.innerText])+d; if(i==12) i=0; else if(i==-1) i=11; this.month=i; this.refresh(); } this.chgDate=function(ob){ if(ob==event.srcElement) return; var x=event.srcElement.innerText; if(x==" ") return; oDate.cells[this.date+this.day+7].style.fontWeight="normal"; this.date=parseInt(x); event.srcElement.style.fontWeight="bold"; } this.setDate=function(ob){ var y0=this.year,m0=this.month; if(ob==event.srcElement) return; var t=ob.id.replace("sel","").toLowerCase(); var x=event.srcElement.innerText; this[t]=parseInt(t=="year"?x:this.MonthName[x]); ob.style.display="none"; if(y0!=this.year||m0
上一篇:狡猾的按钮特效
下一篇:实现每天上午10点钟,定时弹出窗口提醒信息
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
新浪微博推粉丝头条功能 意欲与大号分成
巧用百度推行系统 突显竞价效果
二代 iPad Air将配备2GB内存?为同屏多任务做准备
代工厂生活危机:“富士康们”何去何从?
华为变阵:任正非调整三大业务布局
特斯拉技术专利开放,要革自己的命?
“组合拳”怎么打 拆解小米新玩法
云储存有多远:跨过数据安全问题即可到达
流浪汉高考状元终于找到工作:月薪3000做程序员很满意
推荐阅读
更多>
苹果App Store被大量刷榜:iTunes账号成帮凶
承载京东C2C野心的拍拍网:梦想丰满,现实骨感
猎豹移动上市押海外市场 与小米有合作空间
苹果收购Beats交易或将延期尚需解决5大问题
孙正义入股阿里往事还原:阿里巴巴并非软银首选
银联布局二维码支付,“擦边球”生态不能自救
索尼移动中国区陷裁员风波:业务不佳 员工焦虑
打车软件“明补变暗补”背后的小算盘
阿里巴巴IPO难掩的四个现实问题:天猫销售额成谜、淘宝拖后腿、营收迅猛其他不行和投资者未必买账
马云的SNS之梦有了新目标 收购“微博”
首家国有独资P2P平台上线 或预示政策日渐明朗
十亿美元的告别礼:三星为何要大举重组?
手游市场乱象丛生 受资本热捧野蛮成长
HDS发布《2013中国CIO洞察白皮书》
特斯拉技术专利开放,要革自己的命?
微软很“捉急”:补贴Win8 重加末尾按钮
百度透露无人驾驶战略 研发三维交通地图
马云寄厚望于物流 “菜鸟”行情暂难持续
全球网络遭史上最大规模攻击:攻击数据每秒300G
窗口期:还有哪些互联网公司可能今年IPO?