lemon_slider_validation

功能描述

HTML5滑块验证码,支持移动版

依赖的模块

快速使用

  1. <div class="container">
  2. <input value="admin" readonly/>
  3. <input type="password" value="1234567890" readonly/>
  4. <div id="captcha"></div>
  5. <div id="msg"></div>
  6. </div>
  7. <script src="./libs/jigsaw.min.js"></script>
  8. <script>
  9. jigsaw.init({
  10. el: document.getElementById('captcha'),
  11. onSuccess: function() {
  12. document.getElementById('msg').innerHTML = '登录成功!'
  13. },
  14. onFail: cleanMsg,
  15. onRefresh: cleanMsg
  16. })
  17. function cleanMsg() {
  18. document.getElementById('msg').innerHTML = ''
  19. }
  20. </script>

特别说明