JQuery的Datepicker
DatePicker.html
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Datepicker - Default functionality</title> <script src="jquery/jquery-1.8.3.js"></script> <script src="jquery-ui/js/jquery-ui-1.9.2.js"></script> <script src="jquery-ui/js/jquery.ui.datepicker-zh-CN.js" type="text/javascript" charset="gb2312"></script> <link rel="stylesheet" href="jquery-ui/css/custom-theme/jquery-ui-1.9.2.css"></link> <script> $(function() { $( "#datepicker" ).datepicker(); }); /* $(function() { $("#datepicker").datepicker( { changeMonth : true, changeYear : true }); }); */ </script> </head> <body> <p>Date: <input type="text" id="datepicker"></p> </body> </html>
运行结果:
如果要设置下拉的年、月,设置changeMonth、changeYear为true即可,如上注释的代码。
相关推荐
ParadiserD 2012-03-28
.ui-datepicker{width:17em;padding:.2em.2em0;display:none;font-size:大小}可惜我试了不起作用。我试着用js加载后改,发现成功了!!!!
wenmaomao 2014-01-02
suis 2016-03-16
小源丶同学 2015-09-07
PHP基础学习 2014-08-28
82483564 2014-04-21
谷歌架构师 2019-06-26
乔乔 2019-06-25
有心就有方向 2013-08-12
82550495 2013-08-12
asdjkl 2013-01-17
lihbobo 2019-06-21
hooopo 2009-04-07
Kindlecode 2012-10-24
JessieJWang 2012-10-17
Haoroid 2012-10-17
菜鸟新手taob 2011-10-13
zyb00yaonuli 2011-10-12