一款不错的密码强度插件!
1 jquery.pstrength插件和jquery文件
2 载入jquery文件和jquery.pstrength文件
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.pstrength-min.1.2.js"></script>
<script type="text/javascript">
$(function() {
$('#user_password').pstrength();
});
</script>
3 HTML加入密码输入框,id=”user_password”:
密码:<input type="password" id="user_password" name="user_password" />
4 css:
.pstrength-minchar {
font-size : 10px;
}
input {
width:180px;
height:12px;
line-height:12px;
padding:4px 0px;
border: #cfcfcf 1px solid;
color: #585858;
}