<html>
<head>
<title>jQuery Password Validation(密码验证)插件 - 本地化</title>
<script type="text/javascript" src="http://jquery.bassistance.de/validate.password/lib/jquery.js"></script>
<script type="text/javascript" src="http://jquery.bassistance.de/validate.password/lib/jquery.validate.js"></script>
<script type="text/javascript" src="http://jquery.bassistance.de/validate.password/jquery.validate.password.js"></script>
<script id="demo" type="text/javascript">
$.validator.passwordRating.messages = {
"similar-to-username": "Zu ähnlich zum Benutzername",
"too-short": "Zu kurz",
"very-weak": "Sehr schwach",
"weak": "Schwach",
"good": "Gut",
"strong": "Ausgezeichnet"
}
$(document).ready(function() {
$("#register").validate();
$("#password").valid();
});
</script>
<style>
label {
width: 7em;
float: left;
}
label.error { display: none !important; }
.password-meter-label {
color: #666;
float: left;
width: 7em;
padding: 0;
}
.password-meter {
width: 190px;
margin-left: 7em;
vertical-align: middle;
}
.password-meter-message {
float: left;
text-align: center;
font-weight: bold;
color: black;
padding-left: 5px;
background: #eee;
height: 18px;
width: 221px;
}
.password-meter-message-very-weak {
background: #ff8080;
}
.password-meter-message-weak {
background: #fffb80;
}
.password-meter-message-good {
background: #80d1ff;
}
.password-meter-message-strong {
background: #8cff80;
}
</style>
</head>
<body>
<form id="register">
<div style="clear:both">
<label for="password">密码:</label>
<input class="password" name="password" id="password">
</div>
<label class="password-meter-label" for="password">Passwortstärke:</label>
<div class="password-meter">
<div class="password-meter-message">
</div>
</div>
</form>
</body>
</html>