jQuery滑动将图片角度转正验证插件,一款仿百度登录效果的滑动图片角度验证功能。
js代码
<script src="jquery.min.js"></script>
<script src="jqRotateVerify.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(function(){
//1
var myRotateVerify = new RotateVerify('#rotateWrap',{
initText:'滑动将图片转正',//默认
slideImage:['image/1.jpg','image/2.jpg','image/4.jpg'],//arr [imgsrc1,imgsrc2] 或者str 'imgsrc1'
slideAreaNum:10,// 误差范围角度 +- 10(默认)
getSuccessState:function (res) {//验证通过 返回 true;
console.log('例1' + res);
}
})
//重置
$("#resetBtn").on('click',function(){
myRotateVerify.resetSlide();
})
//可拿到 验证状态
$("#testBtn").on('click',function(){
alert(myRotateVerify.verifyState);
})
//2
var myRotateVerify2 = new RotateVerify('#rotateWrap2',{
initText:'滑动将图片转正',//默认
slideImage:'image/4.jpg',//arr [imgsrc1,imgsrc2] 或者str 'imgsrc1'
slideAreaNum:10,// 误差范围角度 +- 10(默认)
getSuccessState:function (res) {//验证通过 返回 true;
console.log('例2' + res);
}
})
})
</script>
系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791