爱易网
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 浏览次数:20211 次
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点钟,定时弹出窗口提醒信息
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
阿里巴巴IPO难掩的四个现实问题:天猫销售额成谜、淘宝拖后腿、营收迅猛其他不行和投资者未必买账
IT企业人才争夺战打响:员工待遇水涨船高
腾讯微信昨晚再现大规模故障 多地受到影响
网络旅行游记被曝插入"软广告" 个别人士月入数万
苹果30亿美元收购Beats
薛蛮子取保后首次发微博表示:辜负你们了
网络音乐非片面收费 高晓松时间表难完成
Kindle入华遭遇国内厂商“围剿 ” 电信也参战
电信资费新政:三巨头压力大 短期降价仍有争议
推荐阅读
更多>
用户喊话当当网:我彻底把你们丢弃了
Google要求硬件厂商捆绑预装应用的协议曝光
国网公司将加快组建 业界人士称困难重重
华为野心布局未来:投资研发5G对赌1毫秒连接
公信力消失:马航事件社交媒体传播之痛
微软大幅调整Bing在华策略:从高大上到接地气
惠普中国转型只是缩影 未来开展不可预期
电话用户9月实名制:运营商监管受质疑
腾讯再次重申:普通微信誉户相对不收费
从WPS到office365,中国企业能否赶超美国?
史上最严电话实名制9月实行 三大难题待解
中国雅虎邮箱今日关停 由盛及衰的背后
微软张亚勤趋势判断:未来三十年属于物理化互联网
腾讯微信昨晚再现大规模故障 多地受到影响
挂号网高管团体离任 或因投资人失掉决计
高通反垄断案下月有望落定
中国移动4G资费调整方案6月1日起正式实施
全球网络遭史上最大规模攻击:攻击数据每秒300G
谷歌欲收买WhatsApp添加砝码 对方否认
微软为避免代理权争夺 与大股东达成和解协议