Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yeild/jigsaw
canvas滑动验证码
https://github.com/yeild/jigsaw
canvas captcha
Last synced: about 2 months ago
JSON representation
canvas滑动验证码
- Host: GitHub
- URL: https://github.com/yeild/jigsaw
- Owner: yeild
- License: mit
- Created: 2018-03-20T09:09:09.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-05T01:49:09.000Z (almost 4 years ago)
- Last Synced: 2024-08-01T05:17:01.761Z (5 months ago)
- Topics: canvas, captcha
- Language: JavaScript
- Size: 191 KB
- Stars: 688
- Watchers: 20
- Forks: 248
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-canvas - jigsaw - Canvas sliding verification code. ![](https://img.shields.io/github/stars/yeild/jigsaw?style=social) ![](https://img.shields.io/github/forks/yeild/jigsaw?style=social) (Libraries / Verification code)
README
# jigsaw
canvas滑动验证码## [演示地址](https://yeild.github.io/jigsaw/demo.html)
### 用法:
1. 引入[jigsaw.min.js](https://raw.githubusercontent.com/yeild/jigsaw/master/dist/jigsaw.min.js)2.
```
jigsaw.init({
el: document.getElementById('container'),
width: 310, // 可选, 默认310
height: 155, // 可选, 默认155
onSuccess: function () { ... },
onFail: function () { ... },
onRefresh: function () { ... }
})
```### Tips:
.
1. 图片从 https://picsum.photos/ 随机获取,然后用canvas裁剪生成滑块.2. 支持移动端和IE浏览器(IE10+).
3. 纯前端验证不能保证安全性,本项目仅供学习交流.