non_alpha_re = new RegExp(
if (non_alpha_re
strength++;
}
// increase strength if contains upper case
upper_alpha_re = new RegExp(
if (upper_alpha_re
strength++;
}
// increase strength if long enough
if(input_length >=
strength++;
}
var strength_str;
if (strength <=
strength_str =
} else if (strength <=
strength_str =
} else {
strength_str =
}
if(input_str
strength_str =
}
output_display
}
</script>
<div>
<span>密碼強度: </span>
<span id=
</span>
</div>
</div>
</form>
</body>
</html>
[
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20663.html