为注册功能增加密码强度检查 FOR 1.2


把附件文件解压到style目录

打开register.asp
查找
<tr><td>登陆密码:</td><td><input type=password name=password size=20 maxlength=20><%response.write redx%></td></tr>

替换为
<tr><td>登陆密码:</td><td><input type=password name=password size=20 maxlength=20 onkeyup="javascript:SetPwdStrengthEx(document.reg_frm,this.value);"><%response.write redx%></td></tr>
<script type="text/javascript" src="Style/Pw.js"></script>
<script type="text/javascript">
function DispPwdStrength(iN,sHL){ if(iN>3){ iN=3;}for(var i=0;i<4;i++){ var sHCR="css0162";if(i<=iN){ sHCR=sHL;}if(i>0){ GEId("IDSM"+i).className=sHCR;}GEId("IDSMT"+i).style.display=((i==iN)?"inline":"none");}}
</script>
<tr><td>密码强度:</td><td><table style="width: 135px; height: 20px;" cellpadding="0" cellspacing="0"><tbody><tr><td id="IDSM1" style="background-color:#EBEBEB;border-right:solid 1px #BEBEBE;border-bottom:solid 1px #BEBEBE;" align="center" valign="middle" width="33%"><span style="font-size: 1px;"> </span><span id="IDSMT1" style="display: none; color:#FF0000">弱</span></td> <td id="IDSM2" style="background-color:#EBEBEB;border-right:solid 1px #BEBEBE;border-bottom:solid 1px #BEBEBE;" align="center" valign="middle" width="34%"><span style="font-size: 1px;"> </span><span id="IDSMT0" style="display: inline; font-weight: normal; color:#6633FF">未评级</span><span id="IDSMT2" style="display: none; color:#FF9900">中</span></td><td id="IDSM3" style="background-color:#EBEBEB;border-right:solid 1px #BEBEBE;border-bottom:solid 1px #BEBEBE;"  align="center" valign="middle" width="33%"><span style="font-size: 1px;"> </span><span id="IDSMT3" style="display: none; color:#339900">强</span></td></tr></tbody></table></td></tr>


打开user_pass.asp
查找<tr class=bg_tds>
<td>新 密 码:</td>
<td><input type=password name=password1 size=25 maxlength=20><%response.write redx%></td>
</tr>
替换为
<tr class=bg_tds>
<td>新 密 码:</td>
<td><input type=password name=password1 size=25 maxlength=20 onkeyup="javascript:SetPwdStrengthEx(document.user_edit_frm,this.value);"><%response.write redx%></td>
</tr>
<script type="text/javascript" src="Style/Pw.js"></script>
<script type="text/javascript">
function DispPwdStrength(iN,sHL){ if(iN>3){ iN=3;}for(var i=0;i<4;i++){ var sHCR="css0162";if(i<=iN){ sHCR=sHL;}if(i>0){ GEId("IDSM"+i).className=sHCR;}GEId("IDSMT"+i).style.display=((i==iN)?"inline":"none");}}
</script>
<tr class=bg_tds>
<td>密码强度:</td>
<td><table style="width: 165px; height: 20px;" cellpadding="0" cellspacing="0"><tbody><tr><td id="IDSM1" style="background-color:#EBEBEB;border-right:solid 1px #BEBEBE;border-bottom:solid 1px #BEBEBE;" align="center" valign="middle" width="33%"><span style="font-size: 1px;"> </span><span id="IDSMT1" style="display: none; color:#FF0000">弱</span></td> <td id="IDSM2" style="background-color:#EBEBEB;border-right:solid 1px #BEBEBE;border-bottom:solid 1px #BEBEBE;" align="center" valign="middle" width="34%"><span style="font-size: 1px;"> </span><span id="IDSMT0" style="display: inline; font-weight: normal; color:#6633FF">未评级</span><span id="IDSMT2" style="display: none; color:#FF9900">中</span></td><td id="IDSM3" style="background-color:#EBEBEB;border-right:solid 1px #BEBEBE;border-bottom:solid 1px #BEBEBE;"  align="center" valign="middle" width="33%"><span style="font-size: 1px;"> </span><span id="IDSMT3" style="display: none; color:#339900">强</span></td></tr></tbody></table></td>
</tr>下载文件 点击下载此文件

文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 8 | 引用: 0 | 查看次数: 667
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭