蓝雨 发表于 2009-3-4 15:29:36

DZ7.0注册页用户注册密码强度验证





方法步骤
1.打开templates\\default\\register.htm
找到<label><em>{lang password}:</em><input type=\\\"password\\\" name=\\\"password\\\" size=\\\"25\\\" id=\\\"password\\\" onkeypress=\\\"detectcapslock(event, this)\\\" tabindex=\\\"1\\\" class=\\\"txt\\\" /> *</label>替换为<label><em>{lang password}:</em><input type=\\\"password\\\" name=\\\"password\\\" size=\\\"25\\\"onkeyup=\\\"javascript:SetPwdStrengthEx(document.forms,this.value);\\\" id=\\\"password\\\" onkeypress=\\\"detectcapslock(event, this)\\\" tabindex=\\\"1\\\" class=\\\"txt\\\" /> *</label>2.继续查找templates\\default\\register.htm
找到<label><em>{lang password_confirm}:</em><input type=\\\"password\\\" name=\\\"password2\\\" size=\\\"25\\\" id=\\\"password2\\\" onkeypress=\\\"detectcapslock(event, this)\\\" tabindex=\\\"1\\\" value=\\\"\\\" class=\\\"txt\\\" /> *</label>在上面添加<tr>

    <script type=\\\"text/javascript\\\" src=\\\"include/pswdplc.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>

    <td class=\\\"altbg1\\\">密码强度:</td>

    <td class=\\\"altbg2\\\"><table style=\\\"width: 255px; 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\\\" 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\\\" 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\\\" width=\\\"33%\\\"><span style=\\\"font-size: 1px;\\\"> </span><span id=\\\"idSMT3\\\" style=\\\"display: none; color:#339900\\\">强</span></td></tr></tbody></table></td>

   </tr>
3.下载附件并上传到相应目录
页: [1] 2
查看完整版本: DZ7.0注册页用户注册密码强度验证