代码驿站移动版
频道导航
HTML/Xhtml
CSS
JavaScript
HTML5
PHP教程
ASP.NET
正则表达式
AJAX
ThinkPHP
Yii
MySQL
MariaDB
Oracle
MongoDB
Redis
DedeCMS
PHPCMS
帝国CMS
WordPress
Discuz
其它CMS
Zend Studio
Sublime
Notepad
Dreamweaver
Windows
Linux
Nginx
Apache
IIS
CentOS
Ubuntu
Debian
网站优化
工具资源
PHP源码
ASP.NET源码
其它源码
图标素材
按钮素材
字体素材
DedeCMS模板
帝国CMS模板
PHPCMS模板
WordPress模板
Discuz!模板
单页模板
开发软件下载
服务器软件下载
广告投放
联系我们
版权申明
软件编程
网页前端
移动开发
数据库
服务器
脚本语言
PHP代码
JAVA代码
Python代码
Android代码
当前位置:
主页
> >
密码强度检测函数(正则)
时间:2021-06-07 08:55:51 | 栏目: | 点击:次
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>OA登录</title> <style type="text/css"> <!-- td { font-size: 12px; color: #FFFFFF; text-decoration: none; } input { font-size: 12px; color: #003399; text-decoration: none; background-color: #EFF1F5; border: 1px solid #427CD5; } .style2 {color: #efefef} --> </style> <SCRIPT> function showImage(){ var imgObj=new Image(); //创建一个Image对象 imgObj.src="http://www.beingmate.com/images/banner_chang_add.gif"; //装载Image源 if(typeof(imgObj)=="object"){ //判断imgObj装载过后是否为对象,防止异常操作 var width=0; var height=0; width=imgObj.width+20; //+20是因为IE方式的默认边距 height=imgObj.height+20; if(width!=0&&height!=0){ window.open(imgObj.src,"Imagehow", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" +( width )+ ",height=" +( height)); }else{ setTimeout("showImage()", 100); // 判断图片是否装载完成,只有在装载完成后才能取到宽高值 } }else{ alert("系统错误"); } } //showImage(); </SCRIPT> <script type="text/javascript"> //From BBS.51JS.COM By 网络东西 var $ = function(v){return document.getElementById(v);} function isSecurity(v){ if (v.length < 3) { iss.reset();return;} var lv = -1; if (v.match(/[a-z]/ig)){lv++;} if (v.match(/[0-9]/ig)){lv++;} if (v.match(/(.[^a-z0-9])/ig)){lv++;} if (v.length < 6 && lv > 0){lv--;} iss.reset(); switch(lv) { case 0: iss.level0(); break; case 1: iss.level1(); break; case 2: iss.level2(); break; default: iss.reset(); } } var iss = { color:["CC0000","FFCC33","66CC00","CCCCCC"], text:["弱","中","强"], width:["50","100","150","10"], reset:function(){ $("B").style.backgroundColor = iss.color[3]; $("B").style.width = iss.width[3]; $("A").innerHTML = ""; }, level0:function(){ $("B").style.backgroundColor = iss.color[0]; $("B").style.width = iss.width[0]; $("A").innerHTML = "密码较弱"; }, level1:function(){ $("B").style.backgroundColor = iss.color[1]; $("B").style.width = iss.width[1]; $("A").innerHTML = "中"; }, level2:function(){ $("B").style.backgroundColor = iss.color[2]; $("B").style.width = iss.width[2]; $("A").innerHTML = "高强"; } } </script> <style type="text/css"> <!-- .font14 { font-family: "Arial", "Helvetica", "sans-serif"; font-size: 14px; font-weight: bold; } --> </style> </head> <body background="BG.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"> <table width="500" border="0" cellpadding="0" cellspacing="2" bgcolor="#427CD5"> <tr> <td><table width="600" height="350" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td valign="top" background="bg.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="13%" height="126"> </td> <td width="87%"> </td> </tr> <tr> <td> </td> <td align="right"><div align="left"> <span class="font14"><a href="http://www.beingmate.com/user_login/" target="_blank"><font color="#FF3300">贝因美冠军宝贝大赛专用信息平台入口</font></a></span> <p align="center"><font color=#ff0000>用户名或密码错误,请重新输入。</font></p> <form name="loginform" method="post" action="Main.asp" target="_parent"> <div align="left"></div> <table border=0 width="55%" cellspacing=1 cellpadding=3> <tr> <td width="25%" align=right>帐号/编号:</td> <td width="25%"><input name=LoginName type=text size=10 maxlength=20 class="doc_txt" value=""></td> <td align=right>密码: <input name="Pwd" type="Password" size=10 maxlength=20 class="doc_txt" value="" onkeyup="isSecurity(this.value);"></td> </tr> <tr> <td height="50" colspan="3" align=right><div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="36%" align="right"><font class="red" id="A">密码强度检测</font> </td> <td width="64%" valign="top"> <table height="8" border="1" align="left" cellpadding="0" cellspacing="0" bordercolor="#EEEEEE" style="border-collapse:collapse;"> <tr> <td bgcolor="#EEEEEE" width="1" align="center" valign="middle" id="B"></td> </tr> </table></td> </tr> </table> <table width="180" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="83" align="right"><label> <input type="submit" name="Submit" value=" 登 陆 " onclick="return CheckData();"/> </label> </td> <td width="97" align="center"><a href="USER/REG.ASP" target="_blank"><font color="#FFFFFF">申请OA帐号</font></a></td> </tr> <tr align="right"> <td colspan="2"> </td> </tr> </table> <input name="login_auto" type="checkbox" id="login_auto" value="1" > 打勾后表示下次自动登陆 <marquee behavior="scroll" scrollamount="3" direction="left" width="150"> <font color="#FFFFFF"></font> </marquee> </div></td> </tr> </table> <div align="left"></div> </form> <script language=javascript> function CheckData() { if(jtrim(document.loginform.LoginName.value)=="") { alert("请输入登录用户名。") document.loginform.LoginName.focus(); return false; } if(jtrim(document.loginform.LoginName.value).length>100) { alert("登录用户名不能超过100个字。") document.loginform.LoginName.focus(); return false; } return true; } </script> <script language=javascript src="inc/jtrim.js"></script> </div></td> </tr> </table> <div align="right"><a href="http://2006.babyschool.com.cn " target="_blank"><span class="font14"><font color="#FFFFFF">2006贝因美冠军宝贝大赛省级晋级赛进行时 </font></span></a><a href="http://oa.beingmate.com/help/" target="_blank"><font color="#EFEFEF"> 帮助文档</font></a> <a href="feedback.asp" target="_blank"><font color="#EFEFEF">意见反馈</font></a><span class="font14"><font color="#EFEFEF"> </font></span><a href="http://oa.beingmate.com/help/" target="_blank"><font color="#EFEFEF"></font></a> <font color="#0061CE"> 222.212.7.171 </span> </font> </div></td> </tr> </table></td> </tr> </table></td> </tr> </table> </body> </html>
[Ctrl+A 全选 注:
引入外部Js需再刷新一下页面才能执行
]
您可能感兴趣的文章:
docker 容器上编译 go 程序提示找不到文件问题
如何使win2003服务器自动定时重启的图文教程
R语言运行环境安装配置详解
Prototype1.6 JS 官方下载地址
如何将本地构建好的docker镜像发布到dockerhub
相关文章
05-10
基于react hooks,zarm组件库配置开发h5表单页面的实例代码
05-10
浅谈react路由传参的几种方式
05-10
英语常用口语扫盲啦.扫盲!
05-09
R语言求一行(列表、list)数据的平均数操作
05-09
Web网络安全解析宽字节注入攻击原理
JQuery
VUE
AngularJS
MSSql
MySQL
MongoDB
Redis
Linux
Tomcat
Nginx
网站首页
广告投放
联系我们
版权申明
联系站长