form_validate.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>H+ 后台主题UI框架 - 表单验证 jQuery Validation</title>
  7. <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
  8. <meta name="description" content="H+是一个完全响应式,基于Bootstrap3最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术">
  9. <link rel="shortcut icon" href="favicon.ico"> <link href="css/bootstrap.min.css?v=3.3.7" rel="stylesheet">
  10. <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
  11. <link href="css/animate.css" rel="stylesheet">
  12. <link href="css/style.css?v=4.1.0" rel="stylesheet">
  13. </head>
  14. <body class="gray-bg">
  15. <div class="wrapper wrapper-content animated fadeInRight">
  16. <div class="row">
  17. <div class="col-sm-12">
  18. <div class="ibox float-e-margins">
  19. <div class="ibox-title">
  20. <h5>jQuery Validate 简介</h5>
  21. <div class="ibox-tools">
  22. <a class="collapse-link">
  23. <i class="fa fa-chevron-up"></i>
  24. </a>
  25. <a class="dropdown-toggle" data-toggle="dropdown" href="tabs_panels.html#">
  26. <i class="fa fa-wrench"></i>
  27. </a>
  28. <ul class="dropdown-menu dropdown-user">
  29. <li><a href="tabs_panels.html#">选项1</a>
  30. </li>
  31. <li><a href="tabs_panels.html#">选项2</a>
  32. </li>
  33. </ul>
  34. <a class="close-link">
  35. <i class="fa fa-times"></i>
  36. </a>
  37. </div>
  38. </div>
  39. <div class="ibox-content">
  40. <p>jquery.validate.js 是一款优秀的jQuery表单验证插件。它具有如下特点:</p>
  41. <ul>
  42. <li>安装简单</li>
  43. <li>内置超过20种数据验证方法</li>
  44. <li>直列错误提示信息</li>
  45. <li>可扩展的数据验证方法</li>
  46. <li>使用内置的元数据或插件选项来指定您的验证规则</li>
  47. <li>优雅的交互设计</li>
  48. </ul>
  49. <p>官网:<a href="http://jqueryvalidation.org/" target="_blank">http://jqueryvalidation.org/</a>
  50. </p>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="row">
  56. <div class="col-sm-6">
  57. <div class="ibox float-e-margins">
  58. <div class="ibox-title">
  59. <h5>简单示例</h5>
  60. <div class="ibox-tools">
  61. <a class="collapse-link">
  62. <i class="fa fa-chevron-up"></i>
  63. </a>
  64. <a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
  65. <i class="fa fa-wrench"></i>
  66. </a>
  67. <ul class="dropdown-menu dropdown-user">
  68. <li><a href="form_basic.html#">选项1</a>
  69. </li>
  70. <li><a href="form_basic.html#">选项2</a>
  71. </li>
  72. </ul>
  73. <a class="close-link">
  74. <i class="fa fa-times"></i>
  75. </a>
  76. </div>
  77. </div>
  78. <div class="ibox-content">
  79. <form class="form-horizontal m-t" id="commentForm">
  80. <div class="form-group">
  81. <label class="col-sm-3 control-label">姓名:</label>
  82. <div class="col-sm-8">
  83. <input id="cname" name="name" minlength="2" type="text" class="form-control" required="" aria-required="true">
  84. </div>
  85. </div>
  86. <div class="form-group">
  87. <label class="col-sm-3 control-label">E-mail:</label>
  88. <div class="col-sm-8">
  89. <input id="cemail" type="email" class="form-control" name="email" required="" aria-required="true">
  90. </div>
  91. </div>
  92. <div class="form-group">
  93. <label class="col-sm-3 control-label">网站:</label>
  94. <div class="col-sm-8">
  95. <input id="curl" type="url" class="form-control" name="url">
  96. </div>
  97. </div>
  98. <div class="form-group">
  99. <label class="col-sm-3 control-label">说明:</label>
  100. <div class="col-sm-8">
  101. <textarea id="ccomment" name="comment" class="form-control" required="" aria-required="true"></textarea>
  102. </div>
  103. </div>
  104. <div class="form-group">
  105. <div class="col-sm-4 col-sm-offset-3">
  106. <button class="btn btn-primary" type="submit">提交</button>
  107. </div>
  108. </div>
  109. </form>
  110. </div>
  111. </div>
  112. <div class="ibox float-e-margins">
  113. <div class="ibox-content">
  114. <p class="m-t">更多示例请访问官方示例页面:<a href="http://jqueryvalidation.org/files/demo/" target="_blank">查看</a>
  115. </p>
  116. <p>中文API可参考:<a href="http://www.w3cschool.cc/jquery/jquery-plugin-validate.html" target="_blank">http://www.w3cschool.cc/jquery/jquery-plugin-validate.html</a>
  117. </p>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="col-sm-6">
  122. <div class="ibox float-e-margins">
  123. <div class="ibox-title">
  124. <h5>完整验证表单</h5>
  125. <div class="ibox-tools">
  126. <a class="collapse-link">
  127. <i class="fa fa-chevron-up"></i>
  128. </a>
  129. <a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
  130. <i class="fa fa-wrench"></i>
  131. </a>
  132. <ul class="dropdown-menu dropdown-user">
  133. <li><a href="form_basic.html#">选项1</a>
  134. </li>
  135. <li><a href="form_basic.html#">选项2</a>
  136. </li>
  137. </ul>
  138. <a class="close-link">
  139. <i class="fa fa-times"></i>
  140. </a>
  141. </div>
  142. </div>
  143. <div class="ibox-content">
  144. <form class="form-horizontal m-t" id="signupForm">
  145. <div class="form-group">
  146. <label class="col-sm-3 control-label">姓氏:</label>
  147. <div class="col-sm-8">
  148. <input id="firstname" name="firstname" class="form-control" type="text">
  149. <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 这里写点提示的内容</span>
  150. </div>
  151. </div>
  152. <div class="form-group">
  153. <label class="col-sm-3 control-label">名字:</label>
  154. <div class="col-sm-8">
  155. <input id="lastname" name="lastname" class="form-control" type="text" aria-required="true" aria-invalid="false" class="valid">
  156. </div>
  157. </div>
  158. <div class="form-group">
  159. <label class="col-sm-3 control-label">用户名:</label>
  160. <div class="col-sm-8">
  161. <input id="username" name="username" class="form-control" type="text" aria-required="true" aria-invalid="true" class="error">
  162. </div>
  163. </div>
  164. <div class="form-group">
  165. <label class="col-sm-3 control-label">密码:</label>
  166. <div class="col-sm-8">
  167. <input id="password" name="password" class="form-control" type="password">
  168. </div>
  169. </div>
  170. <div class="form-group">
  171. <label class="col-sm-3 control-label">确认密码:</label>
  172. <div class="col-sm-8">
  173. <input id="confirm_password" name="confirm_password" class="form-control" type="password">
  174. <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请再次输入您的密码</span>
  175. </div>
  176. </div>
  177. <div class="form-group">
  178. <label class="col-sm-3 control-label">E-mail:</label>
  179. <div class="col-sm-8">
  180. <input id="email" name="email" class="form-control" type="email">
  181. </div>
  182. </div>
  183. <div class="form-group">
  184. <div class="col-sm-8 col-sm-offset-3">
  185. <div class="checkbox">
  186. <label>
  187. <input type="checkbox" class="checkbox" id="agree" name="agree"> 我已经认真阅读并同意《H+使用协议》
  188. </label>
  189. </div>
  190. </div>
  191. </div>
  192. <div class="form-group">
  193. <div class="col-sm-8 col-sm-offset-3">
  194. <button class="btn btn-primary" type="submit">提交</button>
  195. </div>
  196. </div>
  197. </form>
  198. </div>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. <!-- 全局js -->
  204. <script src="js/jquery.min.js?v=2.1.4"></script>
  205. <script src="js/bootstrap.min.js?v=3.3.7"></script>
  206. <!-- 自定义js -->
  207. <script src="js/content.js?v=1.0.0"></script>
  208. <!-- jQuery Validation plugin javascript-->
  209. <script src="js/plugins/validate/jquery.validate.min.js"></script>
  210. <script src="js/plugins/validate/messages_zh.min.js"></script>
  211. <script src="js/demo/form-validate-demo.js"></script>
  212. <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
  213. <!--统计代码,可删除-->
  214. </body>
  215. </html>