validateonblur.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Validate On Blur - jQuery EasyUI Demo</title>
  6. <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
  8. <link rel="stylesheet" type="text/css" href="../demo.css">
  9. <script type="text/javascript" src="../../jquery.min.js"></script>
  10. <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
  11. </head>
  12. <body>
  13. <h2>Validate On Blur</h2>
  14. <p>Active validation on first blur event.</p>
  15. <div style="margin:20px 0;"></div>
  16. <div class="easyui-panel" title="Register" style="width:100%;max-width:400px;padding:30px 60px;">
  17. <div style="margin-bottom:20px">
  18. <label for="username" class="label-top">User Name:</label>
  19. <input id="username" class="easyui-validatebox tb" data-options="required:true,validType:'length[3,10]',validateOnCreate:false,validateOnBlur:true">
  20. </div>
  21. <div style="margin-bottom:20px">
  22. <label for="email" class="label-top">Email:</label>
  23. <input id="email" class="easyui-validatebox tb" data-options="required:true,validType:'email',validateOnCreate:false,validateOnBlur:true">
  24. </div>
  25. <div style="margin-bottom:20px">
  26. <label for="url" class="label-top">Url:</label>
  27. <input id="url" class="easyui-validatebox tb" data-options="required:true,validType:'url',validateOnCreate:false,validateOnBlur:true">
  28. </div>
  29. <div style="margin-bottom:20px">
  30. <label for="phone" class="label-top">Phone:</label>
  31. <input id="phone" class="easyui-validatebox tb" data-options="required:true,validateOnCreate:false,validateOnBlur:true">
  32. </div>
  33. </div>
  34. <style scoped="scoped">
  35. .tb{
  36. width:100%;
  37. margin:0;
  38. padding:5px 4px;
  39. border:1px solid #ccc;
  40. box-sizing:border-box;
  41. }
  42. </style>
  43. </body>
  44. </html>