爱易网
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 浏览次数:20283 次
以下是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小时制的时间选择特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
“扫黄打非”下9158否认遭整顿
OPPO Find7体验测 Find7综测
蘑菇街CEO陈琪:2015将回归社会化电商
阿里马云:我觉得互联网还有十年可以做
华为变阵:任正非调整三大业务布局
搜狐与奇虎360或结盟对抗BAT
中电信国际漫游费下调85% 世界杯上网28元/天
称产品遭诋毁 奇虎再诉百度
传360周鸿祎曾试图阻止百度收购91无线
推荐阅读
更多>
首批四款“官方”打车软件发布:均为安卓版本
频繁自杀 折射媒体变革中的媒体人迷茫与压力并存
史玉柱此刻离任:营销巨匠为新游戏炒作?
苏宁双线同价遇难题:第一个吃螃蟹不轻松
迅雷向美SEC提交IPO招股书:拟最多筹资1亿美元
微软为避免代理权争夺 与大股东达成和解协议
英特尔涉嫌垄断 欧盟或开出史上最高罚单
京东终于想明白,这些年错过的财运,都藏在女人的时装下
三问刘强东:京东为何近来火气这么大?
苹果CEO抱歉解读:是战略而非“屈服”
苹果优势逐渐丧失 传即将推出廉价iPhone
揭秘:阿里巴巴“无人认领”的三成股权都归谁
618首日看京东阿里不同策略,鹿死谁手?
想玩P2P?几个您必须知道的潜规则
HTC手机为何一败再败?效果出在供应链
iPhone 6将于10月17日内地上市:售5288元起
虚拟运营商流量不清零吸引用户 盈利待明
评论:阿里为什么不试着收购一家香港媒体呢
欧洲6万人起诉Facebook隐私侵权
搜房网遭遇做空 利益保送成“猎杀”焦点