📄 reg.asp
字号:
<html>
<head>
<title>新用户注册</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<Script language="VBScript">
<!--
Sub datacheck()
dim i,temp,email,oicq,page,username,address
username=trim(user.username.value)
If username = Empty Then
MsgBox "「用户名」不得为空白!", 64, "Oh no!"
user.username.focus
Exit Sub
End if
'如果「密码」为空白,处理规则同「会员姓名」
If user.psw.value = Empty Then
MsgBox "「密码」不得为空白!", 64, "Oh no!"
user.psw.focus
Exit Sub
End if
'如果「确认密码」和「密码」不同,处理规则同「会员姓名」
If user.psw.value <> user.againpsw.value Then
MsgBox "「确认密码」和「密码」不同!", 64, "Oh no!"
user.againpsw.focus
Exit Sub
End if
address=trim(user.address.value)
if address=Empty then
MsgBox "地址不能为空!", 64, "Oh no!"
user.address.focus
exit sub
end if
email=trim(user.email.value)
If email="" or email="@" or InStr(1,email, "@") = 0 Then
MsgBox "E-mail为空或未含 '@' 字元!", 64, "Oh no!"
user.email.value
Exit Sub
End if
if user.oicq.value=Empty Then
user.oicq.value="000000"
else
oicq=trim(user.oicq.value)
if len(oicq)<5 or len(oicq)>9 then
MsgBox "OICQ长度不符!", 64, "Oh no!"
user.oicq.focus
exit sub
end if
for i=1 to len(oicq)
temp=mid(oicq,i,1)
if asc(temp)<48 or asc(temp)>57 then
MsgBox "OICQ含非法字符!", 64, "Oh no!"
user.oicq.focus
exit sub
end if
next
end if
page=trim(user.homepage.value)
if page="" or page="http://" then
user.homepage.value="http://"
else
if instr(1,page,".",0)=0 then
MsgBox "个人主页地址输入有误!", 64, "Oh no!"
user.homepage.focus
exit sub
end if
end if
'Submit(传送)表单资料至Web Server
user.Submit
End Sub
-->
</script>
<BODY vLink=#333333 aLink=#333333 link=#333333 bgColor=#ffffff leftMargin=0
topMargin=0><LINK href="forum.css" type=text/css
rel=stylesheet>
<TABLE cellSpacing=0 cellPadding=1 width="95%" align=center bgColor=#777777
border=0>
<TBODY>
<TR>
<TD>
<table style="COLOR: #000000" cellspacing=0 cellpadding=4 width="100%"
border=0 bgcolor="#eeeeee" align="center">
<tbody>
<tr>
<td width="27%" height="2"><font color="#FF0000">>></font>欢迎您,<b>
<%if session("loginname")="" then %>
请先登录!
<%end if%>
<%=session("loginname")%></b></td>
<td width="62%" height="2"><img src="images/reg.gif" width="16" height="16" align="absmiddle"><a href="reg.asp">用户注册</a>|<img src="images/login.gif" width="16" height="16"><a href="login.asp">用户登录</a>|<img src="images/update.gif" width="16" height="16"><a href="usermodify.asp">修改资料</a>|<img src="images/message.gif" width="21" height="14">现在时间:<%=now()%></td>
<td width="11%" height="2">
<div align="right"><img src="images/home.gif" width="14" height="14" align="absmiddle">返回首页</div>
</td>
</tr>
</tbody>
</table></TD></TR></TBODY></TABLE>
<!--#include file="regbody.asp"-->
<table width="95%" border="0" align="center" height="252" cellpadding="1" cellspacing="1" bgcolor="#777777">
<form name="user" method="post" action="regpost.asp" ><tr>
<td colspan="2" bgcolor="#EEEEEE" height="21">
<div align="center"><b>新用户注册</b></div>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="28" width="23%">用户名</td>
<td width="77%" height="28">
<input type="text" name="username" size="20" maxlength="20" >
<font color="#FF0000">**</font>(匿名,昵称)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="21" width="23%">性别</td>
<td height="21" width="77%">
<input type="radio" CHECKED value="男" name="sex" >
<img src="images/Male.gif" width="25" height="27"> 男孩
<input type="radio" name="sex" value="女" >
<img src="images/Female.gif" width="27" height="27"> 女孩 <font color="#FF0000">**</font>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="23%">密码</td>
<td width="77%">
<input type="password" name="psw" size="20" maxlength="20" >
(不能包含中文) <font color="#FF0000">**</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="23%">确认密码</td>
<td width="77%">
<input type="password" name="againpsw" size="20" maxlength="20" >
<font color="#FF0000">**</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="7" bordercolor="#FFFFFF" width="23%">来自何处</td>
<td width="77%" height="7">
<input type="text" name="address" size="10" maxlength="10" >
<font color="#FF0000">**</font> (如:福建泉州))</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="7" bordercolor="#FFFFFF" width="23%">头像</td>
<td width="77%" height="7">
<div align="center">
<% for i=1 to 24
if i=1 then %>
<input type="radio" name="face" value="<%=i%>" checked>
<img src="images/<%=i%>.bmp" widht="25" height="25">
<%else%>
<input type="radio" name="face" value="<%=i%>">
<img src="images/<%=i%>.bmp" widht="25" height="25">
<%end if%>
<%if i mod 8=0 then response.write " <br>"
next%>
</div>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="23%">E-mail</td>
<td width="77%">
<input type="text" name="email" size="20" maxlength="40" value="@" >
(如:wjke@263.net) <font color="#FF0000">**</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="2" width="23%">OICQ</td>
<td width="77%" height="2">
<input type="text" name="oicq" size="15" maxlength="15" >
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="23%">个人主页</td>
<td width="77%">
<input type="text" name="homepage" size="30" maxlength="40" value="http://" >
</td>
</tr>
<tr bgcolor="#eeeeee">
<div align="center">
<td colspan="2" height="30">
<div align="center">
<input type="button" value="提交" onclick="datacheck">
<input type="reset" value="重置">
</div>
</td>
</div>
</tr></form>
</table>
<!--#include file="footer.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -