js快捷输入日期

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

以下式代码:

 <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>js快捷输入日期-柯乐义</title>
<style>
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 {
margin: 0;
padding: 0;
}
body {
color: #333333;
font-family: Simsun,sans-serif;
font-size: 12px;
line-height: 1.5;
}
</style>
</head>
<body>
<table width="300" align="center" >
<tr>
<td height="100" valign="middle"><strong>日期选择控件:</strong></td>
<td width="30"></td>
<td valign="middle"><input id="calendar" type="text"></td>
</tr>
</table>
<div style="width:736px;margin:0px auto;"><a href="http://keleyi.com/a/bjad/tw09x2nt.htm" target="_blank">原文</a></div>
<script src="http://keleyi.com/keleyi/phtml/jstexiao/10/cQuery_110421.js" charset="utf-8" type="text/javascript"></script>
<script src="http://keleyi.com/keleyi/phtml/jstexiao/10/js/calendar.js" charset="utf-8" type="text/javascript"></script>
<script type="text/javascript"> $("#calendar").regMod("calendar","6.0", {
options: {
autoShow: !1,
showWeek: !0,
maxDate: function() {
var a = (new Date).addYears(1);
return a.getFullYear() + "-" + (a.getMonth() + 1) + "-" + a.getDate()
}()
},
listeners:{
onBeforeShow: function() {},
onChange: function() {}
}
})
</script> </body>
</html>

点击这里下载源码

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

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

上一篇:Python学习第四十一天函数装饰器传参数的用法


下一篇:Python配置tab自动补全功能