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

📄 register.asp

📁 是一个电子商务网站的功能介绍
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
username=trim(request("username"))
 
tname=trim(request("tname"))
email=trim(request("email"))
nianji=trim(request("nianji"))
banji=trim(request("banji"))



sql1="select * from tbnianji order by nianjiid"
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,conn,3,2

sql2="select * from tbbanji order by banjiid"
set rs2=server.createobject("adodb.recordset")
rs2.open sql2,conn,3,2
%><html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>注册新用户</title>
<link rel="stylesheet" type="text/css" href="css.css">

</head>

<body>

 
 
  <center>
  <table cellspacing="1" style="border-collapse: collapse" bordercolor="#799AE1" width="400" id="AutoNumber2" border="1">
      <!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.username.value == "")
  {
    alert("请在 准考证号 域中输入值。");
    theForm.username.focus();
    return (false);
  }

  if (theForm.username.value.length > 12)
  {
    alert("在 准考证号 域中,请最多输入 12 个字符。");
    theForm.username.focus();
    return (false);
  }

  if (theForm.pwd.value == "")
  {
    alert("请在 密码 域中输入值。");
    theForm.pwd.focus();
    return (false);
  }

  if (theForm.pwd.value.length > 12)
  {
    alert("在 密码 域中,请最多输入 12 个字符。");
    theForm.pwd.focus();
    return (false);
  }

  if (theForm.pwd1.value == "")
  {
    alert("请在 确认密码 域中输入值。");
    theForm.pwd1.focus();
    return (false);
  }

  if (theForm.pwd1.value.length > 12)
  {
    alert("在 确认密码 域中,请最多输入 12 个字符。");
    theForm.pwd1.focus();
    return (false);
  }

  if (theForm.tname.value == "")
  {
    alert("请在 姓名 域中输入值。");
    theForm.tname.focus();
    return (false);
  }

  if (theForm.tname.value.length > 12)
  {
    alert("在 姓名 域中,请最多输入 12 个字符。");
    theForm.tname.focus();
    return (false);
  }
  return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="saveregister.asp" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1"><tr>
      <td width="100%" height="25" bgcolor="#6699CC" background="images/admin_bg_1.gif" bordercolor="#799AE1">
      <p align="center"><b>&nbsp;<font color="#FFFFFF">用户注册</font></b></td>
    </tr>
    <tr>
      <td width="100%" height="160" bgcolor="#FFFDE8" bordercolor="#799AE1">
    
        <p align="center"> </p>
        <p align="center">准考证号:<!--webbot bot="Validation" s-display-name="准考证号" b-value-required="TRUE" i-maximum-length="12" --><input type="text" name="username" size="20" maxlength="12" value="<%=username%>"></p>
        <p align="center">密&nbsp;&nbsp;&nbsp; 码:<!--webbot bot="Validation" s-display-name="密码" b-value-required="TRUE" i-maximum-length="12" --><input type="password" name="pwd" size="20" maxlength="12"></p>
        <p align="center">确认密码:<!--webbot bot="Validation" s-display-name="确认密码" b-value-required="TRUE" i-maximum-length="12" --><input type="password" name="pwd1" size="20" maxlength="12"></p>
        <p align="center">姓&nbsp;&nbsp;&nbsp; 名:<!--webbot bot="Validation" s-display-name="姓名" b-value-required="TRUE" i-maximum-length="12" --><input type="text" name="tname" size="20" maxlength="12" value="<%=tname%>"></p>
        <p align="center">电子邮箱:<input type="text" name="email" size="20" value="<%=email%>"></p>
        <p align="center">年&nbsp; 级:
        
        <select size="1" name="nianji">
        <% 
do while not rs1.eof
%><option <%if nianji=rs1("nianji") then %> selected <%end if%> value="<%=rs1("nianji")%>"><%=rs1("nianji")%></option>

<%
rs1.movenext
loop %>
        </select>
        
        &nbsp; 班&nbsp; 级:<select size="1" name="banji">
     <% 
do while not rs2.eof
%><option  <%if banji=rs2("banji") then %> selected <%end if%> value="<%=rs2("banji")%>"><%=rs2("banji")%></option>

<%
rs2.movenext
loop %>
 
        </select></p>
       <br>
      </td>
    </tr>
    <tr>
      <td width="100%" height="25" bgcolor="#FFFDE8" bordercolor="#799AE1">
      <p align="center">
      <input type="submit" value="提 交" name="B3" class="s02" ></td>
    </tr></form>
  </table>
  </center>
 

</body>

</html>

⌨️ 快捷键说明

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