基于Canvas实现拖动滑块验证
html5 Canvas drag captcha slider jigsaw
引入组件.
Import components.
<link rel="stylesheet" type="text/css" href="./captcha-slider.css">
<script src="./captcha-slider.js"></script>
开始使用.
Usage.
<div id="captcha-slider" class="captcha-slider"></div>
<script>
CaptchaSlider.init({
id: 'captcha-slider',
width: 310,
height: 155,
})
.then(function (succeed) {
...
}, function (error) {
...
});
</script>
图片存储在七牛云上面, 大家可以在代码里面自行替换掉.
Picture is stored in qiniu. You can replace it in the JavaScript Code.
此项目参考前辈的代码, 十分感谢前辈们的分享!
This project refers to the code of the older generation and is very grateful to the older generation for sharing!
MIT