基于JQuery的密码强度验证代码(2)


<title>无标题页</title>
<script type="text/javascript" src="https://www.jb51.net/js/jquery-1.4.2.min.js"></script>
<!-- custom select plugin js -->
<script type="text/javascript" src="https://www.jb51.net/js/password_strength_plugin.js"></script>
<link type="text/css" href="https://www.jb51.net/css/style.css">
<script>
$(document).ready( function() {
//BASIC
$(".password_test").passStrength({
userid: "#user_id"
});
//ADVANCED
$(".password_adv").passStrength({
shortPass: "top_shortPass",
badPass: "top_badPass",
goodPass: "top_goodPass",
strongPass: "top_strongPass",
baseStyle: "top_testresult",
userid: "#user_id_adv",
messageloc: 0
});
});
</script>


body部分代码
body

复制代码 代码如下:


<body>
<table cellpadding="2" cellspacing="0">
<tr>
<td><label>User Name:</label></td>
<td><input type="text"/></td>
</tr>
<tr>
<td><label>Password:</label></td>
<td><input type="password"/></td>
</tr>
</table>
</body>

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wdsxgd.html