支付宝赞助帐号:service@kuitao8.com 

jquery九宫格解锁的一些实现方法

Created2015-07-14   Views 2105    Author 懒人程序
<html>

<head>

    <title>九宫格解锁</title>

    <link href="patternLock.css"  rel="stylesheet" type="text/css" />

    <script src="jquery.js"></script>

    <script src="patternLock.js"></script>

</head>

<body>

<div id="patternContainer"></div>

<div id="patternHolder6"></div>

<div id="patternHolder61"></div>

<Script>




    var lock = new PatternLock('#patternContainer',{enableSetPattern : true});

    lock.setPattern('12587');

    var lock6=new PatternLock('#patternHolder6',{

        mapper: function(idx){

            return (idx%9) + 1;

        },

        onDraw:function(pattern){

            alert(pattern);

        }




    });

    var lock61=new PatternLock('#patternHolder61',{

        enableSetPattern : true,

        mapper: function(idx){

            return (idx%9) + 1;

        },

        onDraw:function(pattern){

            //alert(pattern);

        }







    });

    //lock61.setPattern('2356917'); 

    lock61.checkForPattern('2356917',function(){
         //效验
        alert("You unlocked your app");

    },function(){

        alert("Pattern is not correct");

    });



</script>



</body>

</html>
九宫格解锁下载地址
http://www.kuitao8.com/20150710/3857.shtml
上一篇: jquery点击后刷新页面的方法
下一篇: jquery视频教程百度网盘下载
支持键盘 ← →

邮件订阅

订阅我们的精彩内容