⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newuserreg.asp

📁 功能最强大的ASP网站
💻 ASP
字号:
<!--#include file="inc/func2.asp"-->
<html>
<head>
<meta http-equiv='Content-Language' content='zh-cn'>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<title>新用户注册</title>
<link rel='stylesheet' type='text/css' href='inc/css.css'>
</head>
<body bgcolor='#cccccc' text='#000000' leftmargin='0' topmargin='0'>
<script language='JavaScript'>
<!--
function checkemail(name, data, allowednull)
{
  var datastr = data;
  var lefttrim = datastr.search(/\S/gi);
  
  if (lefttrim == -1) {
    if (allowednull) {
      return (true);
    } else {
      alert("请输入一个正确的E-mail地址!");
      return (false);
    }
  }
  var myRegExp = /[a-z0-9](([a-z0-9]|[_\-\.][a-z0-9])*)@([a-z0-9]([a-z0-9]|[_\-][a-z0-9])*)((\.[a-z0-9]([a-z0-9]|[_\-][a-z0-9])*)*)/gi;
  var answerind = datastr.search(myRegExp);
  var answerarr = datastr.match(myRegExp);
  
  if (answerind == 0 && answerarr[0].length == datastr.length)
  {
    return (true);
  }
  
  alert("请输入一个正确的E-mail地址!");
  return (false);
}

function IsTel(str,strname) {
  var l=str.length;
  var i,s;
  
  if (str == '' ) {
  	alert(strname + "不能为空");
	return (false);
	}
  
  if(isNaN(str))
	{
		alert(strname+'只能为数字');
		return false;
	}

  s=str.charAt(0);
  if (s=='0')
  {
  	alert(strname+'第一位不能为0');
	return false;
  }
  
  if (str.length != 10 && str.length != 11)
  {
  	alert(strname+'只能为10位或11位的数字');
	return false;
  }
  return (true);

}

function IsCh (str,strname)
{
var len;
var i;
if (str == '' ) {
  	alert(strname + "不能为空");
	return (false);
	}
  
  
for (i=0;i<str.length;i++)
{
if (str.charCodeAt(i)>255) return (true);
}
alert(strname+"必须含有汉字");
return (false);
}

function IsNotCh (str,strname)
{
var len;
var i;
if (str == '' ) {
  	alert(strname + "不能为空");
	return (false);
	}
for (i=0;i<str.length;i++)
{
if (str.charCodeAt(i)>255){ 
	alert(strname + "不能含有汉字");
	return (false);
}
}
return (true);
}

function IsPost(str,strname)
{
	var len;
	var i;
	if (str == '' ) {
  		alert(strname + "不能为空");
		return (false);
	}
	
	if(isNaN(str))
	{
		alert('邮政编码只能为数字');
		return false;
	}
	
	if (str.length != 6)
	{
		alert('邮政编码只能为6位数字');
		return false;
	}
	return true;
}

function checkPass(str,strname)
{
	var len;
	var i;
	if (str == '' ) {
  		alert(strname + "不能为空");
		return (false);
	}

	if (str.length < 6)
	{
		alert(strname+"不能小于6位");
		return (false);
	}
	return true;
}


function check_input()
{
	newuserreg=document.userreg_in;
	if(newuserreg.username.value=='')
	{
		alert('用户名不能为空');
		newuserreg.username.focus();
		return false;
	}
	
	
	if(checkPass(newuserreg.userpass1.value,"用户密码")==false)
	{
		newuserreg.userpass1.focus();
		return false;
	}
	if(checkPass(newuserreg.userpass2.value,"用户密码")==false)
	{
		newuserreg.userpass2.focus();
		return false;
	}
	
	if(newuserreg.userpass1.value!=newuserreg.userpass2.value)
	{
		alert('两次输入密码不一致');
		newuserreg.userpass1.focus();
		return false;
	}

	
	if(IsCh(newuserreg.chname.value,"用户中文名")==false)
	{
		newuserreg.chname.focus();
		return false;
	}
	 
	if(IsNotCh(newuserreg.enname.value,"用户英文名")==false)
	{
		newuserreg.enname.focus();
		return false;
	}
	
	if(IsCh(newuserreg.rchname.value,"联系人中文名")==false)
	{
		newuserreg.rchname.focus();
		return false;
	}
	
	if(IsCh(newuserreg.chcity.value,"中文所在城市")==false)
	{
		newuserreg.chcity.focus();
		return false;
	}
	
	if(IsNotCh(newuserreg.encity.value,"英文所在城市")==false)
	{
		newuserreg.encity.focus();
		return false;
	}
	
	if(IsCh(newuserreg.chaddress.value,"中文联系地址")==false)
	{
		newuserreg.chaddress.focus();
		return false;
	}

	if(IsNotCh(newuserreg.enaddress.value,"英文联系地址")==false)
	{
		newuserreg.enaddress.focus();
		return false;
	}

	if(IsPost(newuserreg.postcode.value,"邮政编码")==false)
	{
		newuserreg.postcode.focus();
		return false;
	}
	
	if(IsTel(newuserreg.telephoneno.value,"联系电话")==false)
	{
		newuserreg.telephoneno.focus();
		return false;
	}
	
	if (checkemail("电子邮件", newuserreg.email.value, false)==false) 
	{
    	newuserreg.email.focus();
   		return false;  
	} 
	
	if(IsTel(newuserreg.faxno.value,"传真")==false)
	{
		newuserreg.faxno.focus();
		return false;
	}
		

	
	
}


//-->
</script>
<div align='left'></div>
<table border='0' cellspacing='0' cellpadding='0' align='left' height='100%' width='99%'>
  <tr> 
    <td bgcolor='949494' width='1'></td>
    <td valign='top' bgcolor='#ffffff' width='818'>
      <table width='100' border='0' cellpadding='0' cellspacing='0' background='images/bgm1.jpg'>
        <tr>
          <td height='6'>&nbsp;</td>
        </tr>
        <tr> 
          <td height='6'> 
            <div align='left'><img src='images/line1.gif' width='420' height='1'></div>
          </td>
        </tr>
        <tr> 
          <td height='20'> 
            <div align='left'> <img src='images/dotdb.gif' width='10' height='10'> 
              <font color='#000000'>当前位置:</font><font color='#043B9C'>首页 -&gt; 
              会员注册</font></div>
          </td>
        </tr>
        <tr> 
          <td height='6'> 
            <div align='left'><img src='images/line1.gif' width='420' height='1'></div>
          </td>
        </tr>
      </table>
      <br>
      <table width='100%' border='0' cellpadding='0' cellspacing='0'>
        <tr> 
          <td height='36'> <img src='images/dotdb.gif' width='10' height='10'> 
            <font color='#000000'>请注意:您输入的资料将作为购买产品时使用的初始数据,请尽量准确地填写,谢谢!</font></td>
        </tr>
        <tr> 
          <td height='36'> <img src='images/dotdb.gif' width='10' height='10'> 
            <font color='#000000'>若您是单位用户请正确填写<font color='#FF0000'>联系人中文名</font>,以方便与您联系,个人用户可不输入。</font></td>
        </tr>
        <tr> 
          <td height='36'> 
            <table width='96%' border='0' align='center'>
              <tr> 
                <td> 

<form method='POST' action='newuserreg_in.asp' name='userreg_in' onsubmit='return check_input()'>
    <table border=1 bordercolor=#3770A9 bordercolordark=#ffffff cellpadding=3 
      cellspacing=0 width=100% class='size09' align='center'>
      <tr>
        <td width='25%' bgcolor='#efefef'>用户名(<font color='#FF0000'>字母和数字</font>)</td>
        <td colspan='3'><input type='hidden'  name='id' value='<%=request("id")%>'>
		<input type='hidden'  name='manageuser' value='<%=request("username")%>'>
		<input type='text' class='form' name='username' size='20' maxlength="25"></td>
      </tr>
      <tr>
        <td width='25%' bgcolor='#efefef'>登录密码*</td>
        <td width='25%'><input type='password' class='form' name='userpass1' size='20' maxlength="25"></td>
        <td width='25%' bgcolor='#efefef'>密码确认*</td>
        <td width='25%'><input type='password' class='form' name='userpass2' size='20' maxlength="25"></td>
      </tr>
      <tr>
        <td width='25%' bgcolor='#efefef'>中文名*</td>
        <td width='25%'><input type='text' class='form' name='chname' size='20' maxlength="50"></td>
        <td width='25%' bgcolor='#efefef'>英文全名*</td>
        <td width='25%'><input type='text' class='form' name='enname' size='20' maxlength="50"></td>
      </tr>
      <tr>
        <td width='25%' bgcolor='#efefef'>联系人中文名</td>
        <td colspan='3'><input type='text' class='form' name='rchname' size='20' maxlength="50"></td>
      </tr>
      <tr>
        <td width='25%' bgcolor='#efefef'>所在国家、地区(中文)*</td>
        <td width='25%'>
        <select class='form' size='1' name='chcountry' onchange='this.form.encountry.selectedIndex=this.form.chcountry.selectedIndex'>
<%print_chcountry ""%>
          </select>
        </td>
        <td width='25%' bgcolor='#efefef'>所在国家、地区(英文)*</td>
        <td width='25%'>
        <select class='form' size='1' name='encountry' onchange='this.form.chcountry.selectedIndex=this.form.encountry.selectedIndex'>
<%print_encountry ""%>
          </select>
        </td>
      </tr>
      <tr>
        <td width='25%' bgcolor='#efefef'>所在省份(中文)*</td>
        <td width='25%'>
        <select class='form' size='1' name='chprovince' onchange='this.form.enprovince.selectedIndex=this.form.chprovince.selectedIndex'>
		<%print_chprovince  ""%>
          </select>
        </td>
        <td width='25%' bgcolor='#efefef'>所在省份(英文)*</td>
        <td width='25%'>
        <select class='form' size='1' name='enprovince' onchange='this.form.chprovince.selectedIndex=this.form.enprovince.selectedIndex'>
		<%print_enprovince  ""%>
          </select>
        </td>
      </tr>
      <tr>
        <td width='25%' bgcolor='#efefef'>所在城市(中文)*</td>
        <td width='25%'><input type='text' class='form' name='chcity' size='20' maxlength="50"></td>
        <td width='25%' bgcolor='#efefef'>所在城市(英文)*</td>
        <td width='25%'><input type='text' class='form' name='encity' size='20' maxlength="50"></td>
      </tr>
      <tr>
        <td width='25%' bgcolor='#efefef'>联系地址(中文)*</td>
        <td width='25%'><input type='text' class='form' name='chaddress' size='20' maxlength="100"></td>
        <td width='25%' bgcolor='#efefef'>联系地址(英文)*</td>
        <td width='25%'><input type='text' class='form' name='enaddress' size='20' maxlength="100"></td>
      </tr>
      <tr>
        <td width='25%' bgcolor='#efefef'>邮政编码*</td>
        <td width='25%'><input type='text' class='form' name='postcode' size='20' maxlength="6"></td>
        <td width='25%' bgcolor='#efefef'>联系电话(如:59187202125)*</td>
        <td width='25%'><input type='text' class='form' name='telephoneno' size='20' maxlength="11"></td>
      </tr>
      <tr>
        <td width='25%' bgcolor='#efefef'>联系E-mail*</td>
        <td width='25%'><input type='text' class='form' name='email' size='20'></td>
        <td width='25%' bgcolor='#efefef'>传真(如:59187202125)*</td>
        <td width='25%'><input type='text' class='form' name='faxno' size='20'></td>
      </tr>
    </table>
<p align='center'><input type='submit' value='确    定' name='B1'></p>
</form>
<img src='images/line1.gif' width='95%' height='1'>
 </td> 
 </tr> 
</table>
</td> 
</tr> 
</table>
<td bgcolor='949494' width='2'></td>
</tr> 
</table>
</body> </html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -