看世界
 
昨日:篇  今日:篇   总帖:篇   会员:
admin
创始人Lv2   
验证密码     
<!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" lang="zh" xml:lang="zh">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>电子邮件地址验证程序</title>
<script language="javascript" type="text/javascript">
//<![CDATA[
 function check( email_address )
 {
  var regex = /^([0-9A-Za-z\-_\.]{5,10})/g;
  if ( regex.test( email_address ) )
  {
    
   var user_name = email_address.replace( regex, "$1" );
   
   var alert_string = "您输入的密码合法";
 
   window.alert( alert_string );
   return true;
  }
  else
  {
   window.alert( "您输入的密码不合法" );
   return false;
  }
 }
//]]>
</script>
</head>
<body style="text-align: center;">
<h1>电子邮件地址验证程序</h1>
请输入电子邮件地址:<input id="email_address" type="text" style="width: 300px;" /><br />
<input type="button" value="验证密码" onclick="return check(document.getElementById('email_address').value);" />
</body>
</html>

 0  已被阅读了22次  楼主 2018-10-26 22:26:06
回复列表

回复:验证密码

LOOK官方站 联系站长
Powered by Look博客