文字验证码
$('#mpanel6').pointsVerify({
defaultNum : txtCount, //默认的文字数量
checkNum : 3, //校对的文字数量
vSpace : 5, //间隔
type: 2,
arith : 0,
imgName : [
'${pageContext.request.contextPath}/resources/new/js/verify/1.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/2.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/3.png',
'${pageContext.request.contextPath}/resources/new/js/verify/4.png',
'${pageContext.request.contextPath}/resources/new/js/verify/5.png',
'${pageContext.request.contextPath}/resources/new/js/verify/6.png',
'${pageContext.request.contextPath}/resources/new/js/verify/7.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/8.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/9.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/10.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/11.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/12.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/13.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/14.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/15.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/16.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/17.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/18.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/19.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/20.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/21.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/22.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/23.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/24.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/25.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/26.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/27.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/28.jpg',
],
imgSize : {
width: '360px',
height: '200px',
},
barSize : {
width : '360px',
height : '40px',
},
ready : function() {
},
success : function() {
isVerifyTrue = true;
$("#submitbtn").click();
},
error : function() {
isVerifyTrue = false;
}
});
滑块验证码
<!-- 滑动验证码专属样式 -->
<style type="text/css">
.verify-bar-area .verify-move-block .verify-sub-block{
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4), 0 0 10px 0 rgba(90, 90, 90, 0.4);
left: 5px;
border-radius: 4px;
}
.verify-bar-area .verify-move-block{
left: 5px;
}
.verify-img-panel .verify-gap{
border-radius: 4px;
background-color: rgba(0, 0, 0, 0.2);
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5) inset;
}
</style>
$('#mpanel6').slideVerify({
type : 2, //类型
vOffset : 15, //误差量,根据需求自行调整
vSpace : 5, //间隔
blockSize : {
width: '40px',
height: '40px',
},
imgName : [
'${pageContext.request.contextPath}/resources/new/js/verify/1.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/2.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/3.png',
'${pageContext.request.contextPath}/resources/new/js/verify/4.png',
'${pageContext.request.contextPath}/resources/new/js/verify/5.png',
'${pageContext.request.contextPath}/resources/new/js/verify/6.png',
'${pageContext.request.contextPath}/resources/new/js/verify/7.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/8.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/9.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/10.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/11.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/12.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/13.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/14.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/15.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/16.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/17.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/18.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/19.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/20.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/21.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/22.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/23.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/24.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/25.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/26.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/27.jpg',
'${pageContext.request.contextPath}/resources/new/js/verify/28.jpg',
],
imgSize : {
width: '360px',
height: '200px',
},
barSize : {
width : '360px',
height : '40px',
},
ready : function() {
},
success : function() {
isVerifyTrue = true;
$("#submitbtn").click();
},
error : function() {
isVerifyTrue = false;
}
});