实现功能:
1、输入字符要在6-16之间;小于6个字符或大于16个字符时给予提示,而且强弱不显示;为0时,也给予提示;
2、当密码在6-16个字符之间时,如果密码全是数字或全是字母,显示弱;密码是数字与字母的组合,则显示强;若为字母数字加下划线,则为强;
效果图如下:
代码如下:
.mm-body{ position: relative; height: 100px; width: 450px; background-color: wheat; } .mm-top{ height:35px; width: 450px; background-color: wheat; } .mm-sr{ height:30px; width: 100px; float: left; text-align: center; line-height: 30px; } #mm-pwd{ float: left; height:25px; background-color: ghostwhite; border-radius: 5px; width: 150px; } .mm-btm{ height: 40px; width: 140px; position: relative; margin-left: 110px; } #lv1,#lv2,#lv3{ height: 30px; width: 40px; border-top: 4px solid gainsboro; margin-left: 3px; float: left; font-size: 18px; text-align: center; line-height: 25px; } 请输入密码: 弱 中 强
总结
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作能带来一定的帮助,如果有疑问大家可以留言交流,谢谢大家对考高分网的支持。



