jquery的绿色拖动验证功能

在网上看到了一个这样的问题:那种像拖动滑块匹配图形的验证方式是怎么实现的?。

突然想到实现一个简单绿色拖动验证码的功能,在网上搜了下,有一个用jquery实现的该功能代码。

体验地址:http://yanshi.sucaihuo.com/jquery/8/897/demo/。

其CSS代码:

#drag{
position: relative;
background-color: #e8e8e8;
width: 300px;
height: 34px;
line-height: 34px;
text-align: center;
}
#drag .handler{
position: absolute;
top: 0px;
left: 0px;
width: 40px;
height: 32px;
border: 1px solid #ccc;
cursor: move;
}
.handler_bg{
background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi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pSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;
}
#drag .drag_bg{
background-color: #7ac23c;
height: 34px;
width: 0px;
}
#drag .drag_text{
position: absolute;
top: 0px;
width: 300px;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
-o-user-select:none;
-ms-user-select:none;
}

HTML代码结构:

<center style="margin-top: 100px">
<div id="drag"></div>
</center>

JS调用方式:

 $('#drag').drag();

JS实现代码:

(function($){
$.fn.drag = function(options){
var x, drag = this, isMove = false, defaults = {
};
var options = $.extend(defaults, options);
//添加背景,文字,滑块
var html = '<div class="drag_bg"></div>'+
'<div class="drag_text" onselectstart="return false;" unselectable="on">拖动滑块验证</div>'+
'<div class="handler handler_bg"></div>';
this.append(html); var handler = drag.find('.handler');
var drag_bg = drag.find('.drag_bg');
var text = drag.find('.drag_text');
var maxWidth = drag.width() - handler.width(); //能滑动的最大间距 //鼠标按下时候的x轴的位置
handler.mousedown(function(e){
isMove = true;
x = e.pageX - parseInt(handler.css('left'), 10);
}); //鼠标指针在上下文移动时,移动距离大于0小于最大间距,滑块x轴位置等于鼠标移动距离
$(document).mousemove(function(e){
var _x = e.pageX - x;
if(isMove){
if(_x > 0 && _x <= maxWidth){
handler.css({'left': _x});
drag_bg.css({'width': _x});
}else if(_x > maxWidth){ //鼠标指针移动距离达到最大时清空事件
dragOk();
}
}
}).mouseup(function(e){
isMove = false;
var _x = e.pageX - x;
if(_x < maxWidth){ //鼠标松开时,如果没有达到最大距离位置,滑块就返回初始位置
handler.css({'left': 0});
drag_bg.css({'width': 0});
}
}); //清空事件
function dragOk(){
handler.removeClass('handler_bg').addClass('handler_ok_bg');
text.text('验证通过');
drag.css({'color': '#fff'});
handler.unbind('mousedown');
$(document).unbind('mousemove');
$(document).unbind('mouseup');
}
};
})(jQuery);

VUE的绿色拖动验证功能

HTML结构:

<template>
<div id="drag">
<div class="drag_bg weui-btn_primary" :style="{width:curW+'px'}"></div>
<div class="drag_text" onselectstart="return false;" unselectable="on":class="[isDragOk ? 'whitecolor':'']">{{text}}</div>
<div class="handler" :style="{left:curW+'px'}" :class="[isDragOk ? 'handler_ok_bg':'handler_bg']"></div>
</div>
</template>

CSS代码:

<style scoped>
#drag {
position: relative;
background-color: #e8e8e8;
width: 100%;
height: 36px;
line-height: 36px;
text-align: center;
}
#drag .drag_bg {
height: 36px;
width:;
}
#drag .drag_text {
position: absolute;
top: 0px;
width: 100%;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
-o-user-select: none;
-ms-user-select: none;
}
.drag_text.whitecolor{
color:#fff;
}
#drag .handler {
position: absolute;
top: 0px;
left: 0px;
width: 40px;
height: 34px;
border: 1px solid #ccc;
cursor: move;
}
.handler_bg {
background:#fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGE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data(){
return{
curW:0,
isMove:false, //是否在运动
isDragOk:false, //是否拖动成功
maxWidth:0, //拖动的最大宽度
element:{},
text:'拖动滑块验证',
currentPos:{
x: 0,
y: 0
}
}
},
created(){ },
mounted () {
var self = this;
this.element = document.querySelector('.handler');
this.getMaxWidth();
window.addEventListener('resize',function(){self.getMaxWidth()});
window.addEventListener('orientationchange',function(){self.getMaxWidth()}); this.element.addEventListener('touchstart',self.touchstartFun,false);
document.querySelector('body').addEventListener('touchmove',self.touchmoveFun,false);
document.querySelector('body').addEventListener('touchend',self.touchendFun,false); this.element.addEventListener('mousedown',self.touchstartFun,false);
document.querySelector('body').addEventListener('mousemove',self.touchmoveFun,false);
document.querySelector('body').addEventListener('mouseup',self.touchendFun,false); (function drawAnimate() {
if( self.curW <= self.maxWidth){
window.requestAnimFrame(drawAnimate,1000/60);
self.curW = self.currentPos.x;
}else{
self.curW = self.currentPos.x = self.maxWidth;
}
})();
},
watch:{ },
methods:{
touchstartFun(e){
if(this.isDragOk){
e.preventDefault();
return;
}
this.isMove = true;
this.curW = this.currentPos.x = this.getCurrentPosition(e).x;
},
touchmoveFun(e){
if(this.isMove && this.curW > 0 && this.curW < this.maxWidth){
this.currentPos.x = this.getCurrentPosition(e).x;
}
else if(this.isMove && this.curW >= this.maxWidth){
this.curW = this.currentPos.x = this.maxWidth;
this.isDragOk = true;
this.text = "验证通过";
}
},
touchendFun(e){
this.isMove = false;
if(this.curW < this.maxWidth){
this.curW = this.currentPos.x = 0;
}
}, getCurrentPosition(event){
var xPos, yPos, rect;
rect = document.getElementById('drag').getBoundingClientRect();
//event = event.originalEvent;
//判断是touch,还是鼠标事件
if (event.type.indexOf('touch') !== -1) {
xPos = event.touches[0].clientX - rect.left;
yPos = event.touches[0].clientY - rect.top;
} //鼠标事件
else {
xPos = event.clientX - rect.left;
yPos = event.clientY - rect.top;
}
return {
x: xPos,
y: yPos
}
},
getMaxWidth(){
this.maxWidth = document.querySelector("#drag").clientWidth - document.querySelector(".handler").scrollWidth;
}
}
}
</script>

页面引用方式:

<slider></slider>

jQuery与vue分别实现超级简单的绿色拖动验证码功能的更多相关文章

  1. JQuery -&gt; 超级简单的下拉菜单

    使用jquery实现一个超级简单的下拉菜单. 效果图 最初的效果 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvRmVlTGFuZw==/font/5a6L ...

  2. 超级简单的jQuery纯手写五星评分效果

    超级简单的评分功能,分为四个步骤轻松搞定: 第一步: 引入jquery文件:这里我用百度CDN的jquery: <script src="http://apps.bdimg.com/l ...

  3. 即时新闻展示插件jQuery News Ticker,超级简单!

    有时候我们为了节省页面空间,会在页面明显处放一小条,用来展示比较重要的即时新闻,一般以轮播的形式出现.今天要介绍的jQuery News Ticker插件就是用来实现这个即时新闻展示功能的,效果图如下 ...

  4. JavaScript,一个超级简单的方法判断浏览器的内核前缀

    先说明,此处的方法是说超级简单的方法,不是指代码超级少,而是用非常简单的知识点,只要懂得怎么写JavaScript的行内样式就可以判断. 大家应该还记得JavaScript行内样式怎么写吧?(看来我是 ...

  5. jquery和vue对比

    1.jquery介绍:想必大家都用过jquery吧,这个曾经也是现在依然最流行的web前端js库,可是现在无论是国内还是国外他的使用率正在渐渐被其他的js库所代替,随着浏览器厂商对HTML5规范统一遵 ...

  6. html超级简单实现点赞(收藏)和取消赞效果

    1.前言 我们经常会遇到对一些列表呀进行点赞呀收藏数据等效果呀.今天就用html+css实现超级简单易上手的点赞和取消赞的demo展示. 2.详情 1.css样式 .like{ font-size:6 ...

  7. jQuery和Vue的区别

    1.jQuery和Vue的区别 jQuery是使用选择器($)选取DOM对象,对其进行赋值.取值.事件绑定等操作,其实和原生的HTML的区别只在于可以更方便的选取和操作DOM对象,而数据和界面是在一起 ...

  8. Notyf - 超级简单、响应式的 JS 通知插件

    通知是网站的常用功能之一,可以用来显示消息.通告.提示等等.Notyf 是一款超级简单.响应式的 JS 通知插件,不依赖 jQuery 库,可以独立使用.赶紧试用一下吧! 在线演示      免费下载 ...

  9. jQuery到Vue的迁移之路

    背景 在前段时间做了L10的某个超复杂超多坑的三端专题之后,组里的小伙伴们一致认为是时候想办法统一一下组里的开发模式了.因为用nie那一套jQuery/zepto(下文jQuery默认包括zepto) ...

随机推荐

  1. 第53节:Java当中的IO流(上)

    Java当中的IO流 在Java中,字符串string可以用来操作文本数据内容,字符串缓冲区是什么呢?其实就是个容器,也是用来存储很多的数据类型的字符串,基本数据类型包装类的出现可以用来解决字符串和基 ...

  2. 前端切图神器-cutterman

    之前我写过一篇关于前端切图的博客:https://www.cnblogs.com/tu-0718/p/9741058.html 但上面的方法在切图量大时依然很费时间,下面向大家推荐这款免费切图神器 c ...

  3. nginx+lua学习

    1. nginx+lua学习 1.1. 网关架构 1.2. nginx命令和信号控制 nginx -s stop 快速关闭,不管有没有正在处理的请求 nginx -s quit 优雅关闭方式,推出前完 ...

  4. rabbitmq系统学习(三)集群架构

    RabbitMQ集群架构模式 主备模式 实现RabbitMQ的高可用集群,一般在并发和数据量不高的情况下,这种模型非常的好用且简单.主备模式也称为Warren模式 HaProxy配置 listen r ...

  5. HOG算法资源备忘

    最近再研究这个算法,找了不少资料来研究,发现这方面的资料好的并不多,今天就把找到的经典的资料做一个汇总,方便后续查阅吧. 一 基本概念和推导: 1 解释最清楚的:中文网站:https://blog.c ...

  6. 协议—IIC

    I2C总线支持任何IC生产过程NMOS CMOS双极性,两线――串行数据 SDA 和串行时钟SCL线在连接到总线的器件间传递信息,每个器件都有一个唯一的地址识别,无论是微控制器.LCD 驱动器.存储器 ...

  7. CentOS安装Nginx Pre-Built

    CentOS安装Nginx Pre-Built比较简单,具体可参见:http://nginx.org/en/linux_packages.html#stable. 本文列出详细步骤,已做备份: cat ...

  8. asp.net MVC 上传文件 System.Web.HttpException: 超过了最大请求长度

    APS.NET MVC 上传文件出现  System.Web.HttpException: 超过了最大请求长度 这个问题 原因是 默认最大上传文件大小为4096,而我提交的文件太大了. 解决方案:修改 ...

  9. mysql 开发进阶篇系列 12 锁问题(隔离级别下锁的差异)

    1. innodb在不同隔离级别下的一致性读及锁的差异 不同的隔离级别下,innodb处理sql 时采用的一致性读策略和需要的锁是不同的,同时,数据恢复和复制机制的特点,也对一些sql的一致性读策略和 ...

  10. myeclipse-common 找不到

    1. 首先打开myeclipse 2. 找到myeclipse的顶部导航栏"myclipse"选项然后打开"Installation Summary..."然后 ...