爱易网
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 浏览次数:20198 次
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点钟,定时弹出窗口提醒信息
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
阿里物流搭上邮政:京东,我们在终点等你!
中兴通讯不打机海战术 将向中高端手机转型
NoomWeight减肥
创维冲击500亿梦想:转型硬件和内容供应商
墨迹天气:产品创新以攻为守方能对抗巨头
眼球识别技术EyeVerify融资600万美元 360参投
阿里入股虎嗅:媒体的脊梁弯了?未必!
纸媒深探版权蓝海抗衡互联网的时机到来了
让一让,小米4来了,碰见米粉请务必绕道走!
推荐阅读
更多>
微信收费形式三选一 腾讯或变身运营商
可靠消息称微型针孔偷拍设备拟全面禁止
马斯克的特斯拉能否保持好势头
微软最后的救命稻草Win 8份额继续上升
世界杯让耐克阿迪大打出手 谁能劈开用户大脑?
宽带中国战略明确 运营商建设成本超6000亿
火狐手机发展前路:或被运营商绑架
乐视28日发布手机进展 LeUI系统Mobile版或曝光
Skype周年:与微软联姻到底有没有未来?
P2P平台科迅网疑“跑路” 涉及金额超2700万
用友软件股价逆势下跌 再融资方案现曙光
湖南卫视扶持芒果TV杀入媒体:版权独播不分销
网曝富士康500万iphone遭退货是确证的事
中移动落马高管盘点:广东移动成反腐重地
中移动一季度净利大降:手机补贴增长过快
阿里巴巴上市后雅虎将面临更大的业绩压力
电信业营改增今起实施 运营商短期利润骤降
索尼移动中国区陷裁员风波:业务不佳 员工焦虑
小米盗版有理激怒乐视:提500部盗播证据猛追打
评论:阿里为什么不试着收购一家香港媒体呢