支持PC和移动端的滑块式验证码 拖动拼图式验证码
XML/HTML Code
- <div class="container-fluid">
- <div class="form-row">
- <div class="col-12">
- <div class="slidercaptcha card">
- <div class="card-header">
- <span>请完成安全验证</span>
- </div>
- <div class="card-body"><div id="captcha"></div></div>
- </div>
- </div>
- </div>
- </div>
JavaScript Code
- <script>
- $('#captcha').sliderCaptcha({
- repeatIcon: 'fa fa-redo',
- setSrc: function () {
- return 'http://images.sdgxgz.com/Pic' + Math.round(Math.random() * 136) + '.jpg';
- },
- onSuccess: function () {
- alert('验证通过!');
- }
- });
- </script>
原文地址:http://www.freejs.net/article_jquerytupiantexiao_794.html