爱易网
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 浏览次数:20193 次
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点钟,定时弹出窗口提醒信息
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
微软为避免代理权争夺 与大股东达成和解协议
中国大陆人口13.7亿 光棍越来越多
百视通:Xbox One汉化获批 游戏迷欢呼吧
神州电脑中止IPO面前:再被质疑财务造假
HTC的三大迷惘:高管釜底抽薪 产品营销战略混乱
北京电信推“0月租卡”,同网通话免费
OPPO Find7体验测 Find7综测
二维码支付大战的号角注定已经吹响,尚需标准发放
Facebook财报前瞻:投资者仍信心不足
推荐阅读
更多>
中方抗议美方限购IT设备 紧张关系加剧
阿里巴巴450亿勾画“现代服务业”藏宝图
迅雷欲3300万美元收购金山快盘 预计9月完成
传搜狗估值12亿美元 与360谈判进入白热化
火狐手机发展前路:或被运营商绑架
佳能利润大跌三成 智能终端倒逼相机厂商转型
想玩P2P?几个您必须知道的潜规则
阿里入股虎嗅:媒体的脊梁弯了?未必!
IT企业人才争夺战打响:员工待遇水涨船高
打车软件“明补变暗补”背后的小算盘
微软不会被颠覆
小微型IDC云化趋势加剧 云计算未来或现终极模式
京东终于想明白,这些年错过的财运,都藏在女人的时装下
诺基亚因充电器问题暂停销售Lumia 2520平板电脑
乐视28日发布手机进展 LeUI系统Mobile版或曝光
苹果音乐效劳新战略:与唱片商停止流媒体协作
传苹果已告知鸿海:两款新iPhone下月发货
中移动推动感地带3G网聊卡 火拼微信沃卡
让一让,小米4来了,碰见米粉请务必绕道走!
国网公司将加快组建 业界人士称困难重重