网站地图
首页
php教程
asp.net教程
手机开发
css教程
网页制作
办公数码
jsp教程
asp教程
ps教程
当前位置:
编程学习网
>>
网页制作
>
jquery
> >
[密码强度检测 jquery]密码强度检测
[密码强度检测 jquery]密码强度检测
发布时间:2018-11-07
【www.gdgbn.com--jquery】
提示:您可以先修改部分代码再运行
<script language="javascript" > //密码强度; function Pass
word
Strength(showed){ this.showed = (typeof(showed) == "boolean")?showed:true; this.styles = new Array(); this.styles[0] = {backgroundColor:"#EBEBEB",borderLeft:"solid 1px #FFFFFF",borderRight:"solid 1px #BEBEBE",borderBottom:"solid 1px #BEBEBE"}; this.styles[1] = {backgroundColor:"#FF4545",borderLeft:"solid 1px #FFFFFF",borderRight:"solid 1px #BB2B2B",borderBottom:"solid 1px #BB2B2B"}; this.styles[2] = {backgroundColor:"#FFD35E",borderLeft:"solid 1px #FFFFFF",borderRight:"solid 1px #E9AE10",borderBottom:"solid 1px #E9AE10"}; this.styles[3] = {backgroundColor:"#95EB81",borderLeft:"solid 1px #FFFFFF",borderRight:"solid 1px #3BBC1B",borderBottom:"solid 1px #3BBC1B"}; this.labels= ["弱","中","强"]; this.divName = "pwd_div_"+Math.ceil(Math.random()*100000); this.minLen = 5; this.width = "150px"; this.height = "16px"; this.content = ""; this.selectedIndex = 0; this.init(); } Pass
word
Strength.prototype.init = function(){ var s = ""; s += ""; for(var i=0;i<3;i++){ s += " "+this.labels[i]+""; } s += ""; s += ""; this.content = s; if(this.showed){ document.write(s); this.copyToStyle(this.selectedIndex); } } PasswordStrength.prototype.copyToObject = function(o1,o2){ for(var i in o1){ o2[i] = o1[i]; } } PasswordStrength.prototype.copyToStyle = function(id){ this.selectedIndex = id; for(var i=0;i<3;i++){ if(i == id-1){ this.$(this.divName+"_label_"+i).style.display = "inline"; }else{ this.$(this.divName+"_label_"+i).style.display = "none"; } } for(var i=0;i
1){ this.minLength = n; } } PasswordStrength.prototype.setStyles = function(){ if(arguments.length == 0){ return ; } for(var i=0;i 0){ ls--; } switch(ls) { case 0: this.copyToStyle(1); break; case 1: this.copyToStyle(2); break; case 2: this.copyToStyle(3); break; default: this.copyToStyle(0); } } </script>
密码强度检测
强度显示: <script language="javascript"> var ps = new PasswordStrength(); ps.setSize("200","20"); ps.setMinLength(5); </script> 密码检测:
提示:您可以先修改部分代码再运行
本文来源:
http://www.gdgbn.com/wangyezhizuo/25844/
上一篇:
jquery fck编辑器|jQuery+FCK编辑器+PHP实现文章分页代码
下一篇:
[jquery ajax]jquery 只允许输入数字的示例
相关推荐
asp.net core_asp.net c 匹配绝对地址的图片格式
【ajax简单与ajax php实例应用程序】ajax简单与ajax+php实例应用
【asp.net core】asp.net 模似http请求代码
[外国id免费]外国免费300m/10g/php/mysql/ftp/个人主页空间
【htaccess图片防盗链】.htaccess图片防盗链
【asp.net core】asp.net C连接oracle数据库并显示数据
[photoshop分辨率怎么调]利用Photoshop调出外景人物照片柔和的粉红色非主流效果
[站内优化过程中关键词]站内优化过程中关键因素分析
精美的什么_精美css搜索框代码
【photoshop分辨率怎么调】利用Photoshop调出人物图片非主流古典青黄色效果教程
网友关注
【json】js Date函数的格式化
[为什么photoshop打不开]如何用Photoshop打造唯美的青色外景婚片效果
php父类与子类读取数据库|php父类与子类读取数据代码
photoshop换照片底色_怎么用Photoshop调出照片经典淡黄色效果
ps怎么利用通道抠图_利用ps通道给偏暗的人物照片美白教程
jquery fck编辑器|jQuery+FCK编辑器+PHP实现文章分页代码
photoshop快速选择工具|怎么用把Photoshop快速打造唯美的非主流效果
智能表远程采集失败|采集远程图片图片并且替换图片地址代码
多个文件上传php js可动态增加文件名_多个文件上传(php+js可动态增加文件上传框)
[ps如何制作寸照片]如何利用ps把照片制作成漂亮的粉色水粉画(ps换衣服)
热门标签
砂浆强度检测
如何检测混凝土强度
磁场强度怎么检测
最新jquery
jquery
【jquery ajax】jQuery validate 表单验证使用方法
jquery
jquery ajax|jQuery LigerUI 插件 ligerTree 使用与简介
jquery
[jquery ajax]jquery 返回顶部、图片比例缩小、验证元素是否存在
jquery
[jquery ajax]jquery ui插件实现漂亮弹出对话框方法
jquery
jquery ajax_jquery inArray()函数详解
jquery
jquery ajax_jquery eq 与 get使用方法
jquery
[jquery ajax]jquery 弹表单提示效果代码
jquery
jquery ajax_jquery 动态演示各种排序实例代码
jquery
jquery ajax|jquery load 中文乱码解决方法
jquery
jquery ajax|jquery 仿淘宝商城左侧导航效果代码
jquery热门文章
jque
[jquery ajax]jquery 只允许输入数字的示例
jque
【jquery ajax】jquery 获取 cookie值代码
jque
【实用jquery操作手册】实用jquery操作表单元素代码
jque
jquery获取设置下拉菜单值增加下拉菜单|jquery获取设置下拉菜单值,增加下拉菜单元素,清空下拉框内容
jque
jquery获取复选框的值_jquery读取复选框值
jque
[jquery ajax]jQuery (function($){...})(jQuery)的详细说明
jque
【图片缩放比例在哪里】jquery图片等比例缩放程序
jque
【jquery ajax】jquery $.ajax json数据传递方法
jque
【jquery ajax】jquery JSON的解析方式
jque
未利用地_利用jQuery getJSON 处理json数据的实例
声明:本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
Copyright©2006-2019 编程学习网 www.gdgbn.com 版权所有