有一段时间,在网上闲逛的时候,看到一个有个好玩的脚本,进行改造后 觉得 非常有 意思 ,就拿出来分享下
如图:
&nbs p;
按照验证码给出的信息,就是手机锁的密码啦!
这个是正确的,会提示我验证通过,如图:
验证通过:
然后,就可以接下来的业务处理啦!
这里是我一部分ht ML 代码:
主要js部分:
<script ty PE ="text/javascript"> $(" # Verification_code").Gesture passwd ({ backgroundColor:"rgb(54,60,80)", color:"#fff", roundRadii:40, pointRadii:18, space:20, width:300, h ei ght:320, lineColor:"rgb(51,122,183)", zindex :100 }); $("#Verification_code").on("hasPasswd",function(e,passwd){ $("# IDC ode").val(passwd); result=true; }); $("#Verification_code").on("hasPasswd",function(e,passwd){ VAR result; if(passwd == text){ result=true; } else { result=false; } if(result == true){ $("#Verification_code").trigger("passwdRight"); setTimeout(function(){ alert("验证通过!"); $(".Verification").hide(); $(".addrole-group").show(); },500); } else{ $("#Verification_code").trigger("passwdWrong");} }); </script>
随机验证码生成js部分:
var text; var arr = [ ]; for(i=0;i<6; i++ ) {arr[i] = parseInt(Math.random()*9+1);check();} function check() { for(j=0;j
当然还需要两个必备js文件,博客没有上传js文件的能力,没办法了,如果有兴趣的朋友,可以私聊找我要哈!
有一段时间,在网上闲逛的时候,看到一个有个好玩的脚本,进行改造后觉得非常有意思,就拿出来分享下
如图:
按照验证码给出的信息,就是手机锁的密码啦!
这个是正确的,会提示我验证通过,如图:
验证通过:
然后,就可以接下来的业务处理啦!
这里是我一部分html代码:
主要js部分:
<script type="text/javascript"> $("#Verification_code").GesturePasswd({ backgroundColor:"rgb(54,60,80)", color:"#fff", roundRadii:40, pointRadii:18, space:20, width:300, height:320, lineColor:"rgb(51,122,183)", zindex :100 }); $("#Verification_code").on("hasPasswd",function(e,passwd){ $("#idcode").val(passwd); result=true; }); $("#Verification_code").on("hasPasswd",function(e,passwd){ var result; if(passwd ==text){ result=true; } else { result=false; } if(result == true){ $("#Verification_code").trigger("passwdRight"); setTimeout(function(){ alert("验证通过!"); $(".Verification").hide(); $(".addrole-group").show(); },500); } else{ $("#Verification_code").trigger("passwdWrong");} }); </script>
随机验证码生成js部分:
var text; var arr = [ ]; for(i=0;i<6;i++) {arr[i] = parseInt(Math.random()*9+1);check();} function check() { for(j=0;j
当然还需要两个必备js文件,博客没有上传js文件的能力,没办法了,如果有兴趣的朋友,可以私聊找我要哈!
觉得可用,就经常来吧! 欢迎评论哦! html5教程 ,巧夺天工,精雕玉琢。小宝典献丑了!
总结
以上是 为你收集整理的 html5教程-一个有趣的html5手机锁分析 全部内容,希望文章能够帮你解决 html5教程-一个有趣的html5手机锁分析 所遇到的问题。
如果觉得 网站内容还不错, 推荐好友。
查看更多关于html5教程-一个有趣的html5手机锁分析的详细内容...