option-theme.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Themes</title>
  6. <link rel="stylesheet" href="demo.css">
  7. </head>
  8. <body>
  9. <form class="form" data-validator-option="{timely:2}">
  10. <h3>Default theme</h3>
  11. <div class="form-item">
  12. <input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
  13. </div>
  14. <div class="form-item">
  15. <input type="password" name="password" data-rule="required;length(6~16)" placeholder="Password">
  16. </div>
  17. <div class="form-item">
  18. <button type="submit">Submit</button>
  19. </div>
  20. </form>
  21. <form class="form" data-validator-option="{timely:2, theme:'yellow_right'}">
  22. <h3>Tip on right</h3>
  23. <div class="form-item">
  24. <input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
  25. </div>
  26. <div class="form-item">
  27. <input type="password" name="password" data-rule="required;length(6~16)" placeholder="Password">
  28. </div>
  29. <div class="form-item">
  30. <button type="submit">Submit</button>
  31. </div>
  32. </form>
  33. <form class="form" data-validator-option="{timely:2, theme:'yellow_right_effect'}">
  34. <h3>Tip with an effect</h3>
  35. <div class="form-item">
  36. <input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
  37. </div>
  38. <div class="form-item">
  39. <button type="submit">Submit</button>
  40. </div>
  41. </form>
  42. <form class="form" data-validator-option="{timely:2, theme:'yellow_top'}">
  43. <h3>Tip on top</h3>
  44. <div class="form-item">
  45. <input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
  46. </div>
  47. <div class="form-item">
  48. <button type="submit">Submit</button>
  49. </div>
  50. </form>
  51. <form class="form" data-validator-option="{timely:2, theme:'simple_right', showOk:''}">
  52. <h3>Simple message on right</h3>
  53. <div class="form-item">
  54. <input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
  55. </div>
  56. <div class="form-item">
  57. <button type="submit">Submit</button>
  58. </div>
  59. </form>
  60. <form class="form" data-validator-option="{timely:2, theme:'simple_bottom'}">
  61. <h3>Simple message on bottom</h3>
  62. <div class="form-item">
  63. <input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
  64. </div>
  65. <div class="form-item">
  66. <button type="submit">Submit</button>
  67. </div>
  68. </form>
  69. <script src="https://cdn.jsdelivr.net/jquery/1.12.3/jquery.min.js"></script>
  70. <script src="../dist/jquery.validator.min.js?local=en"></script>
  71. </body>
  72. </html>