爱易网
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 浏览次数:20163 次
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点钟,定时弹出窗口提醒信息
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
腾讯微信昨晚再现大规模故障 多地受到影响
赴美开店,阿里11Main准备好了吗?
联想架构调整后:Think品牌或推智能手机
团购网站存活率仅18.6% 剩余缺乏千家
八位知名设计师评iOS7:新鲜但复杂
阿里巴巴450亿勾画“现代服务业”藏宝图
薛蛮子取保后首次发微博表示:辜负你们了
美图手机2问世 三大问题令其市场销量堪忧
电信业营改增今起实施 运营商短期利润骤降
推荐阅读
更多>
华为野心布局未来:投资研发5G对赌1毫秒连接
搜狐前副总编何毅加盟乐视 任车联网公司CEO
特斯拉将获上海免费牌照 充电桩面临双重标准
去看看外面的世界吧!别窝里斗了,中国在线旅游商们
做大电影,阿里控股公司在港成立影业集团
承载京东C2C野心的拍拍网:梦想丰满,现实骨感
神奇约炮应用被禁 改名后重返苹果应用商店
全球五大电信设备商业绩:华为净利居首
百度“全网寻人”面前的互联网信息枢纽价值
蜗牛移动董事长石海:号卡被叫停属乌龙事件
从雷军的“互联网七字诀”告诉你一个非妖魔化的小米
挂号网高管团体离任 或因投资人失掉决计
Line风靡亚洲,在北美却进展缓慢
传诺基亚Lumia928下月推出 将与iPhone5看齐
惠普董事长莱恩辞职 为巨额财务减记埋单
传4G牌照国庆节前后发放 TD-LTE制式优先
优酷土豆携手新浪微博 谋攻移动视频失地
靠价格战赚取资费套餐利润差,虚拟运营商必死无疑
估值增长9.8% 阿里IPO前市值达2450亿美元
网络视频的几大趋势将成视频玩家躲不开的发力点