歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> jQuery時間控件Datepicker漢化版使用詳解

jQuery時間控件Datepicker漢化版使用詳解

日期:2017/3/1 10:14:39   编辑:Linux編程

所需js和CSS文件下載地址:

免費下載地址在 http://linux.linuxidc.com/

用戶名與密碼都是www.linuxidc.com

具體下載目錄在 /2012年資料/7月/30日/jQuery時間控件Datepicker漢化版使用詳解/

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>無標題文檔</title>
  6. <link rel="stylesheet" media="all" type="text/css" href="css/jquery-ui.css"/>
  7. <link rel="stylesheet" media="all" type="text/css" href="css/jquery-ui-timepicker-addon.css"/>
  8. <script type="text/javascript" src="js/jquery-1.7.2.js"></script>
  9. <script type="text/javascript" src="js/jquery-ui.min.js"></script>
  10. <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script>
  11. <script type="text/javascript" src="js/jquery-ui-sliderAccess.js"></script>
  12. <script type="text/javascript" src="js/jquery-ui-timepicker-zh-CN.js"></script>
  13. <script type="text/javascript">
  14. $(function(){
  15. $('#example').timepicker({});
  16. });
  17. </script>
  18. <style type="text/css">
  19. #ui-datepicker-div, .ui-datepicker{ font-size: 80%; }
  20. </style>
  21. </head>
  22. <body>
  23. <input type="text" name="example" id="example" value="" />
  24. </body>
  25. </html>

其中jquery-ui-timepicker-zh-CN.js是漢化文件

最終效果與下圖類似。

項目地址:http://trentrichardson.com/examples/timepicker/

Github:http://github.com/trentrichardson/jQuery-Timepicker-Addon

Copyright © Linux教程網 All Rights Reserved