📄 register.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn/conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户注册程序--选择用户名</title>
<style type="text/css">
<!--
.style1 {
font-size: 9pt;
color: #FFFFFF;
}
.style3 {color: #FF0000}
.style4 {color: #000000}
.style5 {color: #0033FF}
.style6 {font-size: 9px}
.style9 {font-size: 9pt}
.style10 {color: #000000; font-size: 9pt; }
.style11 {color: #FF0000; font-size: 9pt; }
a:link {
color: #3366FF;
text-decoration: none;
}
a:visited {
color: #0033FF;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: none;
}
-->
</style>
</head>
<script language="javascript">
function Mycheck(){
if(form1.username.value=="")
{alert("请输入正确的用户名!!");form1.username.focus();return;}
if(form1.pass1.value=="")
{alert("请您正确地输入登录密码(仅可用英文,数字!!)");form1.pass1.focus();return;}
if(form1.pass2.value=="")
{alert("请输入登录密码确认!");form1.pass2.focus();return;}
if(form1.pass1.value!=form1.pass2.value)
{alert("您两次输入的密码不一致,请重新输入!");form1.pass1.focus();return;}
if(form1.question.value=="")
{alert("请输入提示问题,当您忘记密码时可根据该问题提示密码!");form1.question.focus();return;}
if(form1.answer.value=="")
{alert("请输入问题答案!");form1.answer.focus();return;}
form1.submit();
}
</script>
<%
username=request.form("username")
pass1=request.form("pass1")
pass2=request.form("pass2")
question=request.form("question")
answer=request.form("answer")
if username<>"" then
set rs=server.createobject("adodb.recordset")
rs1="select * from tb_register where username='"&username&"'"
rs.open rs1,conn,1,3
if rs.eof and rs.bof then %>
<%
session("username")=username
session("pass1")=pass1
session("question")=question
session("answer")=answer
session("checkout")=checkout
response.redirect("person.asp")
else%>
<script language="javascript">
alert("此用户已存在!!");
window.location.href="register.asp";
</script>
<%end if %>
<%end if %>
<body>
<form name="form1" action="register.asp" method="post">
<table width="600" height="354" border="1" align="center" bordercolor="#FFB5B5">
<tr>
<td height="13" background="images/bg.gif"><div align="center" class="style1 style4 style6 style9">==== 选择用户名 ====</div></td>
</tr>
<tr>
<td height="16"><div align="center" class="style4 style9">注册步骤:1、确认服务条款->2、<span class="style5">选择用户名</span>->3、填写个人资料</div></td>
</tr>
<tr>
<td height="30"><span class="style10">请注意:带有“*”的项目必须。<br>
请填写您的用户名:</span></td>
</tr>
<tr>
<td height="42"><p class="style9"><span class="style3"><span class="style4"> *
通行证用户名:</span>
<input name="username" type="text" id="username"style="height:20px">
</span>
<a href="#" onClick="openwin()">[检测用户]</a>
<script language="javascript">
function openwin(){
if (form1.username.value==""){
alert("请输入用户名!");
form1.username.focus();
return;
}
var str="check_username.asp?username="+form1.username.value;
window.showModalDialog(str,"","dialogWidth=400px;dialogHeight=220px;status=no;help=no;scrollbars=no");
}
</script>
<br><br>
</p></td>
</tr>
<tr>
<td height="27"><span class="style10">请填写安全设置:(安全设置用于验证帐号和找回密码)</span></td>
</tr>
<tr>
<td height="87" valign="top"><span class="style11"><span class="style4">以下信息对保证您的帐号的安全极为重要,请您务必认真填写。<br>
* 输入登录密码:
<input name="pass1" type="password" id="pass1"style="height:20px">
<br>
<br>
* 登录密码确认:</span>
<input name="pass2" type="password" id="pass2"style="height:20px">
</span></td>
</tr>
<tr>
<td height="83"><span class="style11"><span class="style4"> * 密码提示问题:
<input name="question" type="text" id="question"style="height:20px">
<br>
<br>
* 密码提示答案:
</span>
<input name="answer" type="text" id="answer"style="height:20px">
</span></td>
</tr>
<tr>
<td height="33"><div align="center">
<input type="button" name="Submit" value=" 提交表单 " onclick="Mycheck();">
<input type="reset" name="Submit2" value=" 重新设置 ">
</div></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -