📄 带肖像和验正码的jsp注册页面[代码篇续2]_独霸天下.htm
字号:
PADDING-RIGHT: 10px; PADDING-LEFT: 0px; FONT-SIZE: 12px; BACKGROUND: #ffffff; FILTER: alpha(opacity=65); PADDING-BOTTOM: 3px; WIDTH: 100%; COLOR: #000000; LINE-HEIGHT: 19px; PADDING-TOP: 4px; FONT-FAMILY: Arial; LETTER-SPACING: normal; HEIGHT: 19px; TEXT-ALIGN: right; -moz-opacity: 0.5
}
#usrbar A {
COLOR: #0000cc; TEXT-DECORATION: underline
}
#usrbar A:link {
COLOR: #0000cc; TEXT-DECORATION: underline
}
#usrbar A:visited {
COLOR: #0000cc; TEXT-DECORATION: underline
}
#ft {
CLEAR: both; FONT-SIZE: 12px; COLOR: #666666; LINE-HEIGHT: 20px; FONT-FAMILY: Arial; HEIGHT: 20px; TEXT-ALIGN: center
}
#ft A {
COLOR: #7777cc; TEXT-DECORATION: underline
}
#ft A:link {
COLOR: #7777cc; TEXT-DECORATION: underline
}
#ft A:visited {
COLOR: #7777cc; TEXT-DECORATION: underline
}
#usrbar {
LETTER-SPACING: normal
}
#usrbar A {
LETTER-SPACING: normal
}
#usrbar A:link {
LETTER-SPACING: normal
}
#usrbar A:visited {
LETTER-SPACING: normal
}
#ft {
LETTER-SPACING: normal
}
#ft A {
LETTER-SPACING: normal
}
#ft A:link {
LETTER-SPACING: normal
}
#ft A:visited {
LETTER-SPACING: normal
}
</STYLE>
<DIV id=usrbar><NOBR>
<SCRIPT> var myref = encodeURI("http://hi.baidu.com/04023081/blog/item/cf7e20add467fc0b4a36d671%2Ehtml");</SCRIPT>
<A href="http://www.baidu.com/" target=_blank>百度首页</A> | <A
href="http://hi.baidu.com/" target=_blank>百度空间</A>
<SCRIPT language=JavaScript>
document.write(" | <a href='http://passport.baidu.com/?login&tpl=sp&tpl_reg=sp&u="+myref+"'>登录</a>");
</SCRIPT>
</NOBR></DIV>
<DIV id=main align=left><!--[if IE]>
<SCRIPT>
var objmain = document.getElementById("main");
function updatesize(){ var bodyw = window.document.body.offsetWidth; if(bodyw <= 790) objmain.style.width="772px"; else if(bodyw >= 1016) objmain.style.width="996px"; else objmain.style.width="100%"; }
updatesize(); window.onresize = updatesize;
</SCRIPT>
<![endif]-->
<DIV id=header>
<DIV class=lc>
<DIV class=rc></DIV></DIV>
<DIV class=tit><A class=titlink title="独霸天下周倩的空间 http://hi.baidu.com/04023081"
href="http://hi.baidu.com/04023081">独霸天下</A></DIV>
<DIV class=desc>精彩视频基地http://blog.ku6.com/1918732
声明:本空间一部分资源来源网络,均属个人学习之用,如有侵犯您的版权,请联系我.</DIV>
<DIV id=tabline></DIV>
<DIV id=tab><A href="http://hi.baidu.com/04023081">主页</A><A class=on
href="http://hi.baidu.com/04023081/blog">博客</A><A
href="http://hi.baidu.com/04023081/album">相册</A><SPAN>|</SPAN><A
href="http://hi.baidu.com/04023081/profile">个人档案</A> <SPAN>|</SPAN><A
href="http://hi.baidu.com/04023081/friend">好友</A> </DIV></DIV>
<DIV class=stage>
<DIV class=stagepad>
<DIV style="WIDTH: 100%">
<TABLE class=modth cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=modtl width=7> </TD>
<TD class=modtc noWrap>
<DIV class=modhead><SPAN class=modtit>查看文章</SPAN></DIV></TD>
<TD class=modtc noWrap align=right></TD>
<TD class=modtr width=7> </TD></TR></TBODY></TABLE>
<DIV class=modbox id=m_blog>
<DIV class=tit>带肖像和验正码的jsp注册页面[代码篇续2]</DIV>
<DIV class=date>2007年07月26日 星期四 15:44</DIV>
<TABLE style="TABLE-LAYOUT: fixed">
<TBODY>
<TR>
<TD>
<DIV class=cnt id=blog_text><STRONG><FONT
color=#ff0000>register.jsp</FONT></STRONG>
<P><FONT face=宋体><%@ page contentType="text/html; charset=GBK"
%></FONT></P>
<P><FONT
face=宋体><html><BR><head><BR><title><BR>register<BR></title><BR></head><BR><script
language="javascript" type="text/html;charset=gbk"><BR>function
chk()<BR>{<BR> var
userid=document.frmreg1.userid.value;<BR> var
password1=document.frmreg1.password1.value;<BR> var
password2=document.frmreg1.password2.value;<BR> var
waihao=document.frmreg1.waihao.value;<BR> var
email=document.frmreg1.email.value;<BR> var
check=document.frmreg1.Check.value;</FONT></P>
<P><FONT face=宋体><BR> if (userid.length==0)<BR>
{<BR>
alert("对不起,用户名不能为空");<BR>
document.frmreg1.userid.focus();<BR> return
false;<BR> }<BR> else
if(password1.length==0)<BR> {<BR>
alert("对不起,密码不能为空");<BR>
document.frmreg1.password1.focus();<BR> return
false;<BR> }<BR> else
if(password2.length==0)<BR> {<BR>
alert("对不起,密码不能为空");<BR>
document.frmreg1.password2.focus();<BR> return
false;<BR> }<BR> else
if(password1!=password2)<BR> {<BR>
alert("对不起,您两次输入的密码不一致,请重新核对后再输入");<BR>
document.frmreg1.password1.focus();<BR> return
false;<BR> }<BR> else
if(waihao.length==0)<BR> {<BR>
alert("中文别名不能为空");<BR>
document.frmreg1.waihao.focus();<BR> return
false;<BR> }<BR> else
if(email.length==0)<BR> {<BR>
alert("邮箱不能为空");<BR>
document.frmreg1.email.focus();<BR> return
false;<BR> }<BR> else if(email.indexOf("@")==-1 ||
email.indexOf(".")==-1)<BR> {<BR>
alert("对不起,你输入的邮件格式不正确");<BR>
document.frmreg1.email.focus();<BR> return
false;<BR> }<BR> else if(email.indexOf(".") <
email.indexOf("@"))<BR> {<BR>
alert("对不起,你输入的邮件格式不正确");<BR>
document.frmreg1.email.focus();<BR> return
false;<BR> }<BR> else if
(email.indexOf(".")-email.indexOf("@")==1)<BR>
{<BR>
alert("对不起,你输入的邮件格式不正确");<BR>
document.frmreg1.email.focus();<BR> return
false;<BR> }<BR> else if
(check.length==0)<BR> {<BR>
alert("验正码不能为空");<BR>
document.frmreg1.Check.focus();<BR> return
false;<BR> }</FONT></P>
<P> else<BR> {<BR> return
true;<BR> }<BR>}<BR></script><BR><body
bgcolor="#ffffff"></P>
<P><div align="center"><BR><h1
align="center">欢迎您填写注册信息</h1><BR><hr
width="60%"/><BR><form name="frmreg1" method="post"
action="registerservlet" onsubmit="return chk();"
><BR> <input type="hidden" name="getimg"
value="11111" ><BR> <table border="1"
><BR> <tr align="center"
bgcolor="#669999"><BR>
<td colspan="2"></td><BR>
</tr><BR> <tr align="center"
bgcolor="#669999"><BR>
<td colspan="2"> <div align="left"><font
color="#FFFFFF"><font color="#000000">说明:</font><font
color="#FF0000">*<BR>
<font
color="#000000">为必填项</font></font></font></div></td><BR>
</tr><BR>
<tr><BR> <td
width="130" align="right"
bgcolor="#669999">用户名:</td><BR>
<td align="left" bgcolor="#669999"> <input
type="text" name="userid"
size="20"><BR>
<font color="#FF0000">
*</font></td><BR>
</tr><BR>
<tr><BR> <td
width="130" align="right"
bgcolor="#669999">密码:</td><BR>
<td bgcolor="#669999"> <input type="password" name="password1"
size="20"><BR>
<font color="#FF0000">*
</font></td><BR>
</tr><BR>
<tr><BR> <td
width="130" align="right"
bgcolor="#669999">重输入密码:</td><BR>
<td bgcolor="#669999"> <input type="password" name="password2"
size="20"><BR>
<font color="#FF0000">*
</font></td><BR>
</tr><BR>
<tr><BR> <td
align="right"
bgcolor="#669999">中文昵称</td><BR>
<td bgcolor="#669999"> <input name="waihao" type="text"
size="15"> <font
color="#FF0000">*<BR>
</font><BR>
</td><BR>
<tr><BR> <td
align="right" valign="middle"
bgcolor="#669999">人物肖像</td><BR>
<td> <img id="heyitang" height="125"
width="100" src="images1/99.gif"
alt="选择一个漂亮的肖像吧"><BR>
<select name="xiaoxiang"
onchange="heyitang.src='images1/'+this.options[this.selectedIndex].value+'.gif'"><BR>
<option value="01"
selected>1</option><BR>
<option
value="02">2</option><BR>
<option
value="03">3</option><BR>
<option
value="04">4</option><BR>
<option
value="05">5</option><BR>
<option
value="06">6</option><BR>
<option
value="07">7</option><BR>
<option
value="08">8</option><BR>
<option
value="09">9</option><BR>
<option
value="10">10</option><BR>
<option
value="11">11</option><BR>
<option
value="12">12</option><BR>
...... (<FONT
color=#ff0000>类似,省略)</FONT><BR> <BR>
<option
value="96">96</option><BR>
<option
value="97">97</option><BR>
<option value="98">98</option><BR>
<option
value="99">99</option><BR>
<option
value="100">100</option><BR>
</select></td><BR>
<tr><BR> <td
width="130" align="right"
bgcolor="#669999">E-mail:</td><BR>
<td bgcolor="#669999"> <input type="text" name="email"
size="18"><font color="#FF0000">
*</font></td><BR>
<tr><BR>
<tr><BR> <td
width="130" align="right"
bgcolor="#669999">验正码:</td><BR>
<td bgcolor="#669999"> <input type="text" name="Check"
size="10"><font color="#FF0000">
*</font><BR>
<img alt="请选择一个验正码" src="getimg"
/><BR>
</td><BR>
<tr><BR> <td
width="130" height="21" align="right" valign="middle"
bgcolor="#669999"><BR>
<input type="submit" class="btn_grey" value="提交"
name="btnsubmit"></td><BR>
<td align="center" valign="middle" bgcolor="#669999"> <input
type="reset" class="btn_grey" value="全部重写"
name="btnreset"><BR>
</td><BR>
</tr><BR>
</table><BR></form><BR></div><BR></body><BR></html></P>
<P><BR></P></DIV></TD></TR></TBODY></TABLE><BR>
<DIV class=opt><A title=查看该分类中所有文章
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -