爱易网
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特效
很不错的一款日期输入控件
很不错的一款日期输入控件
日期:2014-05-18 浏览次数:20311 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>网页特效代码|JsCode.CN|---又一款日期输入控件,可以输入当前的时间</title> </head> <body> <form name="form1" method="post" action=""> <input type="text" name="textfield" onFocus="CalendarWebControl.show(this,true,this.value);"> 日期时间输入 <input type="text" name="textfield2" onFocus="CalendarWebControl.show(this,false,this.value);"> 日期输入 </form> <script language="javascript"> function atCalendarControl(){ var calendar=this; this.calendarPad=null; this.prevMonth=null; this.nextMonth=null; this.prevYear=null; this.nextYear=null; this.goToday=null; this.calendarClose=null; this.calendarAbout=null; this.head=null; this.body=null; this.today=[]; this.currentDate=[]; this.sltDate; this.target; this.source; /************** 加入日历底板及阴影 *********************/ this.addCalendarPad=function(){ document.write("<div id='divCalendarpad' style='position:absolute;top:100;left:0;width:255;height:187;display:none;'>"); document.write("<iframe frameborder=0 height=189 width=250></iframe>"); document.write("<div style='position:absolute;top:2;left:2;width:250;height:187;background-color:#336699;'></div>"); document.write("</div>"); calendar.calendarPad=document.all.divCalendarpad; } /************** 加入日历面板 *********************/ this.addCalendarBoard=function(){ var BOARD=this; var divBoard=document.createElement("div"); calendar.calendarPad.insertAdjacentElement("beforeEnd",divBoard); divBoard.style.cssText="position:absolute;top:0;left:0;width:250;height:187;border:0 outset;background-color:buttonface;"; var tbBoard=document.createElement("table"); divBoard.insertAdjacentElement("beforeEnd",tbBoard); tbBoard.style.cssText="position:absolute;top:2;left:2;width:248;height:10;font-size:9pt;"; tbBoard.cellPadding=0; tbBoard.cellSpacing=1; /************** 设置各功能按钮的功能 *********************/ /*********** Calendar About Button ***************/ trRow = tbBoard.insertRow(0); calendar.calendarAbout=calendar.insertTbCell(trRow,0,"-","center"); calendar.calendarAbout.title="帮助 快捷键:H"; calendar.calendarAbout.onclick=function(){calendar.about();} /*********** Calendar Head ***************/ tbCell=trRow.insertCell(1); tbCell.colSpan=5; tbCell.bgColor="#99CCFF"; tbCell.align="center"; tbCell.style.cssText = "cursor:default"; calendar.head=tbCell; /*********** Calendar Close Button ***************/ tbCell=trRow.insertCell(2); calendar.calendarClose = calendar.insertTbCell(trRow,2,"x","center"); calendar.calendarClose.title="关闭 快捷键:ESC或X"; calendar.calendarClose.onclick=function(){calendar.hide();} /*********** Calendar PrevYear Button ***************/ trRow = tbBoard.insertRow(1); calendar.prevYear = calendar.insertTbCell(trRow,0,"<<","center"); calendar.prevYear.title="上一年 快捷键:↑"; calendar.prevYear.onmousedown=function(){ calendar.currentDate[0]--; calendar.show(calendar.target,calendar.returnTime,calendar.currentDate[0]+"-"+calendar.formatTime(calendar.currentDate[1])+"-"+calendar.formatTime(calendar.currentDate[2]),calendar.source); } /*********** Calendar PrevMonth Button ***************/ calendar.prevMonth = calendar.insertTbCell(trRow,1,"<","center"); calendar.prevMonth.title="上一月 快捷键:←"; calendar.prevMonth.onmousedown=function(){ calendar.currentDate[1]--; if(calendar.currentDate[1]==0){ calendar.currentDate[1]=12; calendar.currentDate[0]--; } calendar.show(calendar.target,calendar.returnTi
上一篇:狡猾的按钮特效
下一篇:使时钟显示在任意指定的位置
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
逆转猜想:如果阿里成为雅虎大股东会怎样?
Android应用审核乱象:诈骗软件冲上排行榜首
用友软件股价逆势下跌 再融资方案现曙光
微信收费形式三选一 腾讯或变身运营商
广电地方营业厅的一句“罚停”,暴露出了他们的本质
中移动财报外的"五座大山":运营商沦为走秀陪衬
优酷土豆兼并一年:依然处于烧钱形状
中国邮政与阿里合作:邮政网点可做网购自提点
神州泰岳雪上加霜:副总违规买卖遭罚
推荐阅读
更多>
史玉柱卸任巨人网络CEO 继位人选引猜想
苹果优势逐渐丧失 传即将推出廉价iPhone
百度对糯米来说到底意味着什么?
流浪汉高考状元终于找到工作:月薪3000做程序员很满意
苹果6月20日发布iPhone5S 触摸屏概念股生动
小米打响手机价格战 为米3铺路或另有所图
三星维修新规:Galaxy S4主板进水也收费修
网络音乐非片面收费 高晓松时间表难完成
弯曲变形:手机全新的交互方式
盘点改变社会的15种科技:谷歌眼镜将使我们成为半机械人
微软觊觎移动互联市场:手机未出渠道先行
微软与摩托罗拉授权协议涵盖Android和Chrome设备
360涉足搜索范围 百度市场份额面临应战
AMD Q1净亏1.46亿美元 转战SOC拥抱ARM求变
“论文查重”网店一月收入竟过百万
手游市场乱象丛生 受资本热捧野蛮成长
中国手游总裁及8名高管集体下岗,被指涉不当交易
摩托罗拉移动裁员关闭德州Moto X手机工厂
创维冲击500亿梦想:转型硬件和内容供应商
三星起诉LG在冰箱广告中玷污其企业笼统