所需js和CSS文件下载地址:
免费下载地址在 http://linux.linuxidc.com/
用户名与密码都是www.linuxidc.com
具体下载目录在 /2012年资料/7月/30日/jQuery时间控件Datepicker汉化版使用详解/
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>无标题文档</title>
- <link rel="stylesheet" media="all" type="text/css" href="css/jquery-ui.css"/>
- <link rel="stylesheet" media="all" type="text/css" href="css/jquery-ui-timepicker-addon.css"/>
- <script type="text/javascript" src="js/jquery-1.7.2.js"></script>
- <script type="text/javascript" src="js/jquery-ui.min.js"></script>
- <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script>
- <script type="text/javascript" src="js/jquery-ui-sliderAccess.js"></script>
- <script type="text/javascript" src="js/jquery-ui-timepicker-zh-CN.js"></script>
- <script type="text/javascript">
- $(function(){
- $("#example").timepicker({});
- });
- </script>
- <style type="text/css">
- #ui-datepicker-div, .ui-datepicker{ font-size: 80%; }
- </style>
- </head>
- <body>
- <input type="text" name="example" id="example" value="" />
- </body>
- </html>
其中jquery-ui-timepicker-zh-CN.js是汉化文件 最终效果与下图类似。项目地址:http://trentrichardson.com/examples/timepicker/Github:http://github.com/trentrichardson/jQuery-Timepicker-Addon