Widget DatePicker 函数可与JqueryUI中的窗口小部件一起使用。重点放在输入上,以小巧的方式打开交互式日历。
Datepicker - 语法
$( "#datepicker" ).datepicker();
Datepicker - 示例
以下是显示DatePicker用法的简单示例-
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Datepicker - Default functionality</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"> </script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"> </script> <script> $(function() { $( "#datepicker" ).datepicker(); }); </script> </head> <body> <p>Date: <input type="text" id="datepicker"></p> </body> </html>
这将产生以下输出-
参考链接
https://www.learnfk.com/jquery/widget-datepicker.html
标签:jQuery,Datepicker,datepicker,函数,示例,无涯,DatePicker From: https://blog.51cto.com/u_14033984/6898780