财神道app下载最新版本-财神到购彩大厅(彩世界)

热门关键词: 财神道app下载最新版本,财神到购彩大厅

javascript贯彻密码强度展现【财神到购彩大厅】

javascript兑现密码强度呈现,javascript密码强度

密码强度显示和中文强弱呈现

复制代码 代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'a.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">   
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
        <style type="text/css">
    * {margin:0px;padding:0px;}
    .J_PasswordStatus{padding-bottom:0px;height:18px;}
    .status-bar{margin:0px;display:inline-block;width:80px;height:5px;padding:1px;border:1px solid #42BF26;background-color:white;vertical-align:middle;font-size:0;}
    .status-bar span{background-color:#42BF26;height:5px;display:inline-block;}
    </style>
  </head>
  <body>
    <input type="password"  id="pwd1" style="float:left;margin-top:5px;" onkeyup="checkPassword();"/>
        <div id="p_PasswordStatus" class="J_PasswordStatus"
            style="display: none; width: 300px;">
            <span class="trigger">密码强度: </span>
            <span class="status-bar" style="text-indent: 0px;">
            <span style="line-height: 5px;">  </span>
            </span>
            <span class="status-result"></span>
        </div>
  </body>
</html>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
function checkPassword(){
    var pwd = $("#pwd1").val();
    gPasswdStatus(pwd,'p_PasswordStatus');
    }
function gPasswdStatus(value,id){
    var status = $("#" id);
    var result = $("#" id).find(".status-result")[0];
    var bar = $("#" id).find(".status-bar span");
    if (value === "") {
        status.css("display","none");
    } else {
        var score = gCheckPassword(value);
        bar.css("width",score "%");
        var resultDesp = gGetResultDesp(score);
        result.innerHTML = resultDesp;
        status.css("display","block");
    }
}
/**
 * 查验密码强度并重回得分
 *
 * @param {}
 *            password
 * @return {Number}
 */
function gCheckPassword(password) {
    var _score = 0;
    if (!password) {
        return 0
    }
    if (password.length <= 4) {
        _score = 5
    } else {
        if (password.length >= 5 && password.length <= 7) {
            _score = 10
        } else {
            if (password.length >= 8) {
                _score = 25
            }
        }
    }
    var _UpperCount = (password.match(/[A-Z]/g) || []).length;
    var _LowerCount = (password.match(/[a-z]/g) || []).length;
    var _LowerUpperCount = _UpperCount _LowerCount;
    if (_UpperCount && _LowerCount) {
        _score = 20
    } else {
        if (_UpperCount || _LowerCount) {
            _score = 10
        }
    }
    var _NumberCount = (password.match(/[d]/g, "") || []).length;
    if (_NumberCount > 0 && _NumberCount <= 2) {
        _score = 10
    } else {
        if (_NumberCount >= 3) {
            _score = 20
        }
    }
    var _CharacterCount = (password.match(/[[email protected]#$%^&*?_.-~]/g) || []).length;
    if (_CharacterCount == 1) {
        _score = 10
    } else {
        if (_CharacterCount > 1) {
            _score = 25
        }
    }
    if (_NumberCount && (_UpperCount && _LowerCount)
            && _CharacterCount) {
        _score = 5
    } else {
        if (_NumberCount && _LowerUpperCount && _CharacterCount) {
            _score = 3
        } else {
            if (_NumberCount && _LowerUpperCount) {
                _score = 2
            }
        }
    }
    return _score
}
 /**
  * 遵照密码强度得分再次回到密码强弱度粤语提示
  *
  * @param {}
  *            score
  * @return {String}
  */
 function gGetResultDesp(score) {
    if (score <= 5) {
        return "u592au77ed"
    } else {
    if (score > 5 && score < 20) {
        return "u5f31"
        } else {
        if (score >= 20 && score < 60) {
            return "u4e2d"
        } else {
            if (score >= 60) {
                return "u5f3a"
            } else {
                return ""
            }
            }
        }
    }
 }
</script>

以上所述正是本文给大家分享的全部内容了,希望对大家纯熟精晓javascript能够享有辅助。

密码强度突显和粤语强弱显示 复制代码 代码如下: !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitio...

上述所述就是本文给我们大饱眼福的全体内容了,希望对大家掌握明白javascript能够享有援救。

帮顾客酌

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'a.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">   
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
        <style type="text/css">
    * {margin:0px;padding:0px;}
    .J_PasswordStatus{padding-bottom:0px;height:18px;}
    .status-bar{margin:0px;display:inline-block;width:80px;height:5px;padding:1px;border:1px solid #42BF26;background-color:white;vertical-align:middle;font-size:0;}
    .status-bar span{background-color:#42BF26;height:5px;display:inline-block;}
    </style>
  </head>
  <body>
    <input type="password"  id="pwd1" style="float:left;margin-top:5px;" onkeyup="checkPassword();"/>
        <div id="p_PasswordStatus" class="J_PasswordStatus"
            style="display: none; width: 300px;">
            <span class="trigger">密码强度: </span>
            <span class="status-bar" style="text-indent: 0px;">
            <span style="line-height: 5px;">  </span>
            </span>
            <span class="status-result"></span>
        </div>
  </body>
</html>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
function checkPassword(){
    var pwd = $("#pwd1").val();
    gPasswdStatus(pwd,'p_PasswordStatus');
    }
function gPasswdStatus(value,id){
    var status = $("#" id);
    var result = $("#" id).find(".status-result")[0];
    var bar = $("#" id).find(".status-bar span");
    if (value === "") {
        status.css("display","none");
    } else {
        var score = gCheckPassword(value);
        bar.css("width",score "%");
        var resultDesp = gGetResultDesp(score);
        result.innerHTML = resultDesp;
        status.css("display","block");
    }
}
/**
 * 查证密码强度并回到得分
 *
 * @param {}
 *            password
 * @return {Number}
 */
function gCheckPassword(password) {
    var _score = 0;
    if (!password) {
        return 0
    }
    if (password.length <= 4) {
        _score = 5
    } else {
        if (password.length >= 5 && password.length <= 7) {
            _score = 10
        } else {
            if (password.length >= 8) {
                _score = 25
            }
        }
    }
    var _UpperCount = (password.match(/[A-Z]/g) || []).length;
    var _LowerCount = (password.match(/[a-z]/g) || []).length;
    var _LowerUpperCount = _UpperCount _LowerCount;
    if (_UpperCount && _LowerCount) {
        _score = 20
    } else {
        if (_UpperCount || _LowerCount) {
            _score = 10
        }
    }
    var _NumberCount = (password.match(/[d]/g, "") || []).length;
    if (_NumberCount > 0 && _NumberCount <= 2) {
        _score = 10
    } else {
        if (_NumberCount >= 3) {
            _score = 20
        }
    }
    var _CharacterCount = (password.match(/[!@#$%^&*?_.-~]/g) || []).length;
    if (_CharacterCount == 1) {
        _score = 10
    } else {
        if (_CharacterCount > 1) {
            _score = 25
        }
    }
    if (_NumberCount && (_UpperCount && _LowerCount)
            && _CharacterCount) {
        _score = 5
    } else {
        if (_NumberCount && _LowerUpperCount && _CharacterCount) {
            _score = 3
        } else {
            if (_NumberCount && _LowerUpperCount) {
                _score = 2
            }
        }
    }
    return _score
}
 /**
  * 依据密码强度得分再次来到密码强弱度汉语提醒
  *
  * @param {}
  *            score
  * @return {String}
  */
 function gGetResultDesp(score) {
    if (score <= 5) {
        return "u592au77ed"
    } else {
    if (score > 5 && score < 20) {
        return "u5f31"
        } else {
        if (score >= 20 && score < 60) {
            return "u4e2d"
        } else {
            if (score >= 60) {
                return "u5f3a"
            } else {
                return ""
            }
            }
        }
    }
 }
</script>

相关小说

有关寻觅:

明日看甚

寻觅技艺库

回来首页

  • iphone 6的Safari密码遮蔽在哪个地方
  • 金立Note锁屏密码怎么设置
  • 手提式有线电话机唯品会登入密码忘记该怎么复位密码?
  • 手提式无线话机天猫怎么买火车票
  • 手提式有线电话机qq空间怎么给自个儿留言?
  • 隐性调用php程序的办法

有关频道: HTML/CSS  HTML5  Javascript  jQuery  AJax教程  前者代码  正则表明式  Flex教程  WEB前端教程  

密码强度呈现和国文强弱呈现

javascript贯彻密码强度展现

 那篇作品主要介绍了运用javascript实现密码强度展现,十一分实用的功用,从个人项目中移植出来的,分享给我们,希望咱们能够喜欢。

 

 

密码强度展现和中文强弱显示

 

代码如下:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'a.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<style type="text/css">
* {margin:0px;padding:0px;}
.J_PasswordStatus{padding-bottom:0px;height:18px;}
.status-bar{margin:0px;display:inline-block;width:80px;height:5px;padding:1px;border:1px solid #42BF26;background-color:white;vertical-align:middle;font-size:0;}
.status-bar span{background-color:#42BF26;height:5px;display:inline-block;}
</style>
</head>
<body>
<input type="password" id="pwd1" style="float:left;margin-top:5px;" onkeyup="checkPassword();"/>
<div id="p_PasswordStatus" class="J_PasswordStatus"
style="display: none; width: 300px;">
<span class="trigger">密码强度: </span>
<span class="status-bar" style="text-indent: 0px;">
<span style="line-height: 5px;"> </span>
</span>
<span class="status-result"></span>
</div>
</body>
</html>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
function checkPassword(){
var pwd = $("#pwd1").val();
gPasswdStatus(pwd,'p_PasswordStatus');
}
function gPasswdStatus(value,id){
var status = $("#" id);
var result = $("#" id).find(".status-result")[0];
var bar = $("#" id).find(".status-bar span");
if (value === "") {
status.css("display","none");
} else {
var score = gCheckPassword(value);
bar.css("width",score "%");
var resultDesp = gGetResultDesp(score);
result.innerHTML = resultDesp;
status.css("display","block");
}
}
/**
* 核准密码强度并回到得分
*
* @param {}
* password
* @return {Number}
*/
function gCheckPassword(password) {
var _score = 0;
if (!password) {
return 0
}
if (password.length <= 4) {
_score = 5
} else {
if (password.length >= 5 && password.length <= 7) {
_score = 10
} else {
if (password.length >= 8) {
_score = 25
}
}
}
var _UpperCount = (password.match(/[A-Z]/g) || []).length;
var _LowerCount = (password.match(/[a-z]/g) || []).length;
var _LowerUpperCount = _UpperCount _LowerCount;
if (_UpperCount && _LowerCount) {
_score = 20
} else {
if (_UpperCount || _LowerCount) {
_score = 10
}
}
var _NumberCount = (password.match(/[d]/g, "") || []).length;
if (_NumberCount > 0 && _NumberCount <= 2) {
_score = 10
} else {
if (_NumberCount >= 3) {
_score = 20
}
}
var _CharacterCount = (password.match(/[[email protected]#$%^&*?_.-~]/g) || []).length;
if (_CharacterCount == 1) {
_score = 10
} else {
if (_CharacterCount > 1) {
_score = 25
}
}
if (_NumberCount && (_UpperCount && _LowerCount)
&& _CharacterCount) {
_score = 5
} else {
if (_NumberCount && _LowerUpperCount && _CharacterCount) {
_score = 3
} else {
if (_NumberCount && _LowerUpperCount) {
_score = 2
}
}
}
return _score
}
/**
* 遵照密码强度得分再次回到密码强弱度粤语提醒
*
* @param {}
* score
* @return {String}
*/
function gGetResultDesp(score) {
if (score <= 5) {
return "u592au77ed"
} else {
if (score > 5 && score < 20) {
return "u5f31"
} else {
if (score >= 20 && score < 60) {
return "u4e2d"
} else {
if (score >= 60) {
return "u5f3a"
} else {
return ""
}
}
}
}
}
</script>

 

如上所述正是本文给大家大快朵颐的全部内容了,希望对大家熟悉掌握javascript能够享有援助。

那篇作品重要介绍了使用javascript实现密码强度突显,十二分实用的功用,从个人项目中移植出来的,分享给大家,...

你或然感兴趣的小说:

  • JS 密码强度验证(包容IE,火狐,谷歌(Google))
  • js查证密码强度(低中高)附图
  • Js密码强度实时验证代码
  • javascript密码强度校验代码(二种方法)
  • JavaScript 密码强度判别代码
  • js检查评定客商输入密码强度
  • js密码强度实时检查评定代码
  • JavaScript剖断密码强度(自写代码)
  • js密码强度校验
  • js达成密码强度检验【附示例】
  • js正则表达式验证密码强度【推荐】
  • js密码强度检查评定
  • JavaScript动态检验密码强度的贯彻形式
  • JS实现的四级密码强度检验作用示例

复制代码 代码如下:

本文由财神道app下载最新版本发布于web前端,转载请注明出处:javascript贯彻密码强度展现【财神到购彩大厅】