爱易网
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 浏览次数:20216 次
以下是HTML网页特效代码,点击运行按钮可查看效果:
以下是程序代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>日历演示</title> <script language="javascript"> /**************** * 由于字数限制,请下载附件看使用说明. *******如果您使用本日历控件 请保留该信息 谢谢! *********** * http://2lin.net * Email:caoailin@gmail.com * QQ:38062022 * Creation date: 2006-11-22 ******************/ function Calendar(objName) { this.style = { borderColor : "#909eff", //边框颜色 headerBackColor : "#909EFF", //表头背景颜色 headerFontColor : "#ffffff", //表头字体颜色 bodyBarBackColor : "#f4f4f4", //日历标题背景色 bodyBarFontColor : "#000000", //日历标题字体色 bodyBackColor : "#ffffff", //日历背景色 bodyFontColor : "#000000", //日历字体色 bodyHolidayFontColor : "#ff0000", //假日字体色 watermarkColor : "#d4d4d4", //背景水印色 moreDayColor : "#cccccc" }; this.showMoreDay = false; //是否显示上月和下月的日期 this.Obj = objName; this.date = null; this.mouseOffset = null; this.dateInput = null; this.timer = null; }; Calendar.prototype.toString = function() { var str = this.getStyle(); str += '<div Author="alin" class="calendar" style="display:none;" onselectstart="return false" oncontextmenu="return false" id="Calendar">\n'; str += '<div Author="alin" class="cdrWatermark" id="cdrWatermark"></div><div id="cdrBody" style="position:absolute;left:0px;top:0px;z-index:2;width:140px;">'; str += this.getHeader(); str += this.getBody(); str += '</div><div Author="alin" id="cdrMenu" style="position:absolute;left:0px;top:0px;z-index:3;display:none;" onmouseover="' + this.Obj + '.showMenu(null);" onmouseout="' + this.Obj + '.hideMenu();"></div></div>'; return str; }; Calendar.prototype.getStyle = function() { var str = '<style type="text/css">\n'; str += '.calendar{position:absolute;width:140px!important;width /**/:142px;height:184px!important;height /**/:174px;background-color:'+this.style.bodyBackColor+';border:1px solid ' + this.style.borderColor + ';left:0px;top:0px;z-index:9999;}\n'; str += '.cdrHeader{background-color:'+ this.style.headerBackColor +';width:140px;height:22px;font-size:12px;color:'+this.style.headerFontColor+';}\n'; str += '.cdrWatermark{position:absolute;left:0px;top:55px;width:140px;font-family: Arial Black;font-size:50px;color:'+this.style.watermarkColor+';z-index:1;text-align:center;}\n'; str += '.cdrBodyBar{background-color:' + this.style.bodyBarBackColor + ';font-size:12px;color:' + this.style.bodyBarFontColor + ';width:140px;height:20px;}\n'; str += '.cdrBody{width:140px;height:122px!important; height /**/:110px;font-size:12px;cursor:pointer;color:' + this.style.bodyFontColor + ';}\n'; str += '.dayOver{height:16px;padding:0px;border:1px solid black;background-color:#f4f4f4;}\n'; str += '.dayOut{padding:1px;border:none;height:16px;}\n'; str += '.menuOver{background-color:'+this.style.headerBackColor+';color:'+this.style.headerFontColor+';font-size:12px;}\n'; str += '.headerOver{border:1px solid black;background-color:#f4f4f4;color:black;cursor:default;}\n'; str += '.cdrMenu{font-size:12px;border:1px solid #000000;background-color:#ffffff;cursor:default;width:100%}\n'; str += 'html>body #Calendar{width:142px;174px;}'; str += '</style>\n'; return str; }; Calendar.prototype.getHeader = function() { var str = '<table Author="alin" class="cdrHeader" cellSpacing="2" cellPadding="0"><tr Author=
上一篇:狡猾的按钮特效
下一篇:一个24小时制的时间选择特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
iOS7拖累iPad 5、iPad mini2发布 传十月份推出
HTC的三大迷惘:高管釜底抽薪 产品营销战略混乱
携程收买酷讯成定局:转型互联网+投资
中方抗议美方限购IT设备 紧张关系加剧
苹果售后生态链乱象:供需失衡价钱不一
玩游戏式的趣味戒烟App:Kwit
眼球识别技术EyeVerify融资600万美元 360参投
英特尔VS苹果:移动芯片大战
170号码扎堆上市:手机话费私人定制时代到来?
推荐阅读
更多>
二维码支付大战的号角注定已经吹响,尚需标准发放
京东封杀财付通:终极目标是电商生态圈
从3G牌照发放看中国4G规划效果
《归来》遭视频网盗播 乐视网状告小米盒子侵权
华为野心布局未来:投资研发5G对赌1毫秒连接
小米盗版有理激怒乐视:提500部盗播证据猛追打
如家撤离同程内情:祸起反水OTA“联盟”?
谷歌安卓全球副总裁为何跳槽中国企业小米?
英特尔承认,联想最新K系列智能手机放弃英特尔处理器
马云自称在美国曾被绑票
解析2014年阿里百度等五大互联网巨头深度布局
中电信国际漫游费下调85% 世界杯上网28元/天
百视通:Xbox One汉化获批 游戏迷欢呼吧
iOS7拖累iPad 5、iPad mini2发布 传十月份推出
中国移动4G资费调整方案6月1日起正式实施
568倍PE,“长跑者”亚马逊的高估值之谜
永不磨灭的九大尖端编程语言
200美元英特尔Android笔记本行将到来
迅雷再次在美提交IPO申请
从雷军的“互联网七字诀”告诉你一个非妖魔化的小米