检验密码强度的代码
2008-01-17 11:17
375 查看
这里不能上传压缩包,比较不爽,只能把几个文件放上来了。
第一个是显示的页面。Untitled-1.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="WEBBlue1033.css"/>
<script type="text/javascript" src="pswdplc.js"></script>
</head>
<body>
<form name="RegProfileForm" style="margin:0px;" method="POST" target="_self" onsubmit="return OnSubmit(this);">
Password:
<input name="p3e8" type="password" id="id3e8_9" maxlength="16" autocomplete="off" value="" style="ime-mode:disabled" class="css0081" onkeyup="javascript:SetPwdStrengthEx(document.forms[0],this.value);" /><br/>
</script>
<table cellpadding="0" cellspacing="0" class="css0161" style="height:19px"><tr><td id="idSM1" width="33%" class="css0162" align="center"><span style="font-size:1px"> </span><span id="idSMT1" style="display:none;">弱</span></td><td id="idSM2" width="34%" class="css0162" align="center" style="border-left:solid 1px #fff"><span style="font-size:1px"> </span><span id="idSMT0" style="display:inline;font-weight:normal;color:#666">Not rated</span><span id="idSMT2" style="display:none;">中</span></td><td id="idSM3" width="33%" class="css0162" align="center" style="border-left:solid 1px #fff"><span style="font-size:1px"> </span><span id="idSMT3" style="display:none;">强</span></td></tr></table>
</body>
</html>
第二个是JS文件,pswdplc.js
var kNoCanonicalCounterpart = 0;
var kCapitalLetter = 0;
var kSmallLetter = 1;
var kDigit = 2;
var kPunctuation = 3;
var kAlpha = 4;
var kCanonicalizeLettersOnly = true;
var kCananicalizeEverything = false;
var gDebugOutput = null;
var kDebugTraceLevelNone = 0;
var kDebugTraceLevelSuperDetail = 120;
var kDebugTraceLevelRealDetail = 100;
var kDebugTraceLevelAll = 80;
var kDebugTraceLevelMost = 60;
var kDebugTraceLevelFew = 40;
var kDebugTraceLevelRare = 20;
var gDebugTraceLevel = kDebugTraceLevelNone;
function DebugPrint()
function CSimilarityMap()
function SimilarityMap_Add(element, canonicalCounterpart)
function SimilarityMap_Lookup(element)
function SimilarityMap_GetCount()
CSimilarityMap.prototype.Add = SimilarityMap_Add;
CSimilarityMap.prototype.Lookup = SimilarityMap_Lookup;
CSimilarityMap.prototype.GetCount = SimilarityMap_GetCount;
function CDictionaryEntry(length, wordList)
function DictionaryEntry_Lookup(strWord)
CDictionaryEntry.prototype.Lookup = DictionaryEntry_Lookup;
function CDictionary()
function Dictionary_Lookup(strWord)
function Dictionary_Add(length, wordList)
CDictionary.prototype.Lookup = Dictionary_Lookup;
CDictionary.prototype.Add = Dictionary_Add;
var gSimilarityMap = new CSimilarityMap();
var gDictionary = new CDictionary();
function CharacterSetChecks(type, fResult)
function isctype(character, type, nDebugLevel)
function CanonicalizeWord(strWord, similarityMap, fLettersOnly)
function IsLongEnough(strWord, nAtLeastThisLong)
function SpansEnoughCharacterSets(strWord, nAtLeastThisMany)
function FoundInDictionary(strWord, similarityMap, dictionary)
function IsCloseVariationOfAWordInDictionary(strWord, threshold, similarityMap, dictionary)
function ClientSideStrongPassword()
function ClientSideMediumPassword()
function ClientSideWeakPassword()
.css0162
.css0163
.css0164
.css0165
{}{background-color:#3ABB1C;border-right:solid 1px #267A12;border-bottom:solid 1px #267A12;}
第一个是显示的页面。Untitled-1.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="WEBBlue1033.css"/>
<script type="text/javascript" src="pswdplc.js"></script>
</head>
<body>
<form name="RegProfileForm" style="margin:0px;" method="POST" target="_self" onsubmit="return OnSubmit(this);">
Password:
<input name="p3e8" type="password" id="id3e8_9" maxlength="16" autocomplete="off" value="" style="ime-mode:disabled" class="css0081" onkeyup="javascript:SetPwdStrengthEx(document.forms[0],this.value);" /><br/>
</script>
<table cellpadding="0" cellspacing="0" class="css0161" style="height:19px"><tr><td id="idSM1" width="33%" class="css0162" align="center"><span style="font-size:1px"> </span><span id="idSMT1" style="display:none;">弱</span></td><td id="idSM2" width="34%" class="css0162" align="center" style="border-left:solid 1px #fff"><span style="font-size:1px"> </span><span id="idSMT0" style="display:inline;font-weight:normal;color:#666">Not rated</span><span id="idSMT2" style="display:none;">中</span></td><td id="idSM3" width="33%" class="css0162" align="center" style="border-left:solid 1px #fff"><span style="font-size:1px"> </span><span id="idSMT3" style="display:none;">强</span></td></tr></table>
</body>
</html>
第二个是JS文件,pswdplc.js
var kNoCanonicalCounterpart = 0;
var kCapitalLetter = 0;
var kSmallLetter = 1;
var kDigit = 2;
var kPunctuation = 3;
var kAlpha = 4;
var kCanonicalizeLettersOnly = true;
var kCananicalizeEverything = false;
var gDebugOutput = null;
var kDebugTraceLevelNone = 0;
var kDebugTraceLevelSuperDetail = 120;
var kDebugTraceLevelRealDetail = 100;
var kDebugTraceLevelAll = 80;
var kDebugTraceLevelMost = 60;
var kDebugTraceLevelFew = 40;
var kDebugTraceLevelRare = 20;
var gDebugTraceLevel = kDebugTraceLevelNone;
function DebugPrint()
function CSimilarityMap()
function SimilarityMap_Add(element, canonicalCounterpart)
function SimilarityMap_Lookup(element)
function SimilarityMap_GetCount()
CSimilarityMap.prototype.Add = SimilarityMap_Add;
CSimilarityMap.prototype.Lookup = SimilarityMap_Lookup;
CSimilarityMap.prototype.GetCount = SimilarityMap_GetCount;
function CDictionaryEntry(length, wordList)
function DictionaryEntry_Lookup(strWord)
CDictionaryEntry.prototype.Lookup = DictionaryEntry_Lookup;
function CDictionary()
function Dictionary_Lookup(strWord)
function Dictionary_Add(length, wordList)
CDictionary.prototype.Lookup = Dictionary_Lookup;
CDictionary.prototype.Add = Dictionary_Add;
var gSimilarityMap = new CSimilarityMap();
var gDictionary = new CDictionary();
function CharacterSetChecks(type, fResult)
function isctype(character, type, nDebugLevel)
function CanonicalizeWord(strWord, similarityMap, fLettersOnly)
function IsLongEnough(strWord, nAtLeastThisLong)
function SpansEnoughCharacterSets(strWord, nAtLeastThisMany)
function FoundInDictionary(strWord, similarityMap, dictionary)
function IsCloseVariationOfAWordInDictionary(strWord, threshold, similarityMap, dictionary)
function ClientSideStrongPassword()
function ClientSideMediumPassword()
function ClientSideWeakPassword()
.css0162
.css0163
.css0164
.css0165
{}{background-color:#3ABB1C;border-right:solid 1px #267A12;border-bottom:solid 1px #267A12;}
相关文章推荐
- 检验密码强度的代码
- 检验密码强度的代码
- 检验密码强度的代码
- 用于判断用户注册时,密码强度的JS代码
- 用Javascript评估用户输入密码的强度实现代码
- js密码强度实时检测代码
- javascript 密码强度规则、打分、验证(给出前端代码,后端代码可根据强度规则翻译)
- 来自Google的密码强度Javascript验证代码
- Java实现--密码强度检测--的工具类代码
- 使用jQuery开发一个带有密码强度检验的超酷注册页面
- jquery判断密码强度的验证代码
- javascripit实现密码强度检测代码分享
- 正则表达式之js检验密码强度
- 解读ASP.NET密码强度验证代码实例分享
- 使用jQuery开发一个带有密码强度检验的超酷注册页面
- jQuery实现提示密码强度的代码
- 检验密码强度的JS类
- 密码强度检测效果实现原理与代码
- 用于判断用户注册时,密码强度的JS代码。
- 使用jQuery开发一个带有密码强度检验的超酷注册页面