js快捷输入日期

点击这里查看效果http://keleyi.com/keleyi/phtml/jstexiao/10.htm

以下式代码:

 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 5 <title>js快捷输入日期-柯乐义</title>
 6 <style>
 7  div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, em, button {
 8     margin: 0;
 9     padding: 0;
10 }
11 body {
12     color: #333333;
13     font-family: Simsun,sans-serif;
14     font-size: 12px;
15     line-height: 1.5;
16 }
17 </style>
18 </head>
19 <body>
20 <table width="300" align="center" >
21   <tr>
22     <td height="100" valign="middle"><strong>日期选择控件:</strong></td>
23     <td width="30"></td>
24     <td valign="middle"><input id="calendar" type="text"></td>
25   </tr>
26 </table>
27 <div style="width:736px;margin:0px auto;"><a href="http://keleyi.com/a/bjad/tw09x2nt.htm" target="_blank">原文</a></div>
28 <script src="http://keleyi.com/keleyi/phtml/jstexiao/10/cQuery_110421.js" charset="utf-8" type="text/javascript"></script>
29 <script src="http://keleyi.com/keleyi/phtml/jstexiao/10/js/calendar.js" charset="utf-8" type="text/javascript"></script>
30 <script type="text/javascript">
31 
32 $("#calendar").regMod("calendar","6.0", {
33     options: {
34     autoShow: !1,
35     showWeek: !0,
36     maxDate: function() {
37         var a = (new Date).addYears(1);
38         return a.getFullYear() + "-" + (a.getMonth() + 1) + "-" + a.getDate()
39     }()
40    },
41    listeners:{
42                    onBeforeShow: function() {},
43                    onChange: function() {}
44               }
45   })
46 </script>
47 
48 </body>
49 </html>

点击这里下载源码

原文:http://keleyi.com/a/bjad/tw09x2nt.htm

web前端:http://www.cnblogs.com/jihua/p/webfront.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值