📄 reg_1.jsp
字号:
<%@ page contentType="text/html;charset=GBK"%>
<%@ include file="INC/const.jsp"%>
<%
stats = "用户注册";
%>
<%@ include file="INC/theme.jsp"%>
<%
out.println(headLine(forumID, forumName, forumLogo, "", 1, stats, tableWidth));
%>
<script>
onload = function(){document.theForm.userName.focus()};
function testUser()
{
var f = document.theForm;
var username = f.userName.value;
if(username==''){
alert('请正确输入您要注册的用户名!');
f.userName.focus();
return;
}
if(username.length<4){
alert('用户名至少有四个字母!');
f.userName.focus();
return false;
}
if(ischinese(username)){
alert('用户名不能有中文!');
f.userName.focus();
return false;
}
var retXML = XMLHttp.run("<root act=\"testUser\" username=\"" + username + "\"></root>");
var row = retXML.getElementsByTagName('ROWNUM')[0].text;
if(row != 0){
alert('您的用户已经被注册!');
f.userName.focus();
return;
}
}
function ischinese(s){
for(var i=0;i<s.length;i++){
//alert(s.charCodeAt(i))
if(s.charCodeAt(i)>=10000){
return true;
}
}
return false;
}
function formCheck(f){
if(f.userName.value==""){
alert('用户名不能为空');
f.userName.focus();
return false;
}
if(f.userName.value.length<4){
alert('用户名至少有四个字母!');
f.userName.focus();
return false;
}
if(ischinese(f.userName.value)){
alert('用户名不能有中文!');
f.userName.focus();
return false;
}
if(f.psw.value==""){
alert('密码不能为空!');
f.psw.focus();
return false;
}
if(f.pswc.value==""){
alert('确认密码不能为空!');
f.pswc.focus();
return false;
}
if(f.userEmail.value==""){
alert('电子邮箱不能为空!');
f.userEmail.focus();
return false;
}
}
</script>
<FORM name=theForm action=regPost.jsp method=post
onsubmit="return formCheck(this)">
<table cellpadding=0 cellspacing=0 border=0 width=<%=tableWidth%>
bgcolor=<%=tableBackColor%> align=center>
<tr>
<td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<TBODY>
<TR align=middle bgcolor=<%=tableTitleColor%>>
<TD colSpan=2 height=24>
<b>新用户注册</b>
</TD>
</TR>
<TR bgcolor=<%=tableBodyColor%>>
<TD width=150>
注 册 名**
</TD>
<TD>
<INPUT maxLength=12 size=12 name=userName onblur="testUser();">
(<font color=red>不</font>可以使用中文名)
</TD>
</TR>
<TR bgcolor=<%=tableBodyColor%>>
<TD width=150>
性 别
</TD>
<TD>
<INPUT type=radio CHECKED value="1" name=sex>
<IMG height=27 src="pic/Male.gif" width=25 align=absMiddle>
男孩
<INPUT type=radio value="0" name=sex>
<IMG height=27 src="pic/Female.gif" width=27 align=absMiddle>
女孩
</TD>
</TR>
<TR bgcolor=<%=tableBodyColor%>>
<TD width=150>
密 码**
</TD>
<TD>
<INPUT type=password maxLength=10 size=13 name=psw>
</TD>
</TR>
<TR bgcolor=<%=tableBodyColor%>>
<TD width=150>
密码确认 **
</TD>
<TD>
<INPUT type=password maxLength=10 size=13 name=pswc>
</TD>
</TR>
<TR bgcolor=<%=tableBodyColor%>>
<TD width=150 height=32>
Email地址 **
</TD>
<TD height=32>
<INPUT maxLength=50 size=27 name=userEmail>
</TD>
</TR>
<TR bgcolor=<%=tableBodyColor%>>
<TD width=150 height=32>
形象
<img id=face src="<%=picURL%>Image1.gif" width=32 height=32
alt=个人形象代表>
**
</TD>
<TD height=15>
<select name=face size=1
onChange="document.images['face'].src=options[selectedIndex].value;"
style="BACKGROUND-COLOR: #99CCFF; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000">
<%
for (i = 1; i < 61; i++) {
%>
<option value='<%=picURL%>Image<%=i%>.gif'>
Image
<%=i%>
</option>
<%
}
%>
</select>
注册成功后,有更多、更绚的头像等着你噢!
</TR>
<tr bgcolor=<%=tableBodyColor%>>
<td width=150 height=32>
发帖有回复时是否提示
</td>
<td height=16>
<input type="radio" name="showRe" value="1" checked>
提示我
<input type="radio" name="showRe" value="0">
不提示
</tr>
<TR bgcolor=<%=tableBodyColor%>>
<TD width=150 valign=top>
自定义头像
<br>
如果图像位置中有连接图片将以自定义的为主
</TD>
<TD>
<%
if ("1".equals(uploadFlag)) {
%>
<iframe allowtransparency=true name="ad" frameborder=0 width=100% height=60
scrolling=no src=reg_upload.jsp></iframe>
<br>
<%
}
%>
图像位置:
<input type="TEXT" name="myface" size=20 maxlength=100>
完整Url地址
<br>
宽 度:
<input type="TEXT" name="width" size=3 maxlength=3 value="32">
20---150的整数
<br>
高 度:
<input type="TEXT" name="height" size=3 maxlength=3 value="32">
20---250的整数
<br>
</TD>
</TR>
<TR bgcolor=<%=tableBodyColor%>>
<TD width=150>
OICQ号码
</TD>
<TD>
<INPUT maxLength=20 size=44 name=oicq>
</TD>
</TR>
<TR bgcolor=<%=tableBodyColor%>>
<TD width=150>
签 名
<BR>
<BR>
文字将出现在您发表的文章的结尾处。体现您的个性。
</TD>
<TD>
<TEXTAREA name=sign rows=5 wrap=PHYSICAL cols=42></TEXTAREA>
</TD>
</TR>
<TR align=middle bgcolor=<%=tableTitleColor%>>
<TD colSpan=2>
<DIV align=center>
<INPUT value="注 册" name=Submit type=submit>
<INPUT type=reset value="重 写" name=Submit2>
</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</td>
</tr>
</table>
</FORM>
<%@ include file="foot.jsp"%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -