当前位置: 代码迷 >> Java Web开发 >> 论坛注册的代码怎么写啊?
  详细解决方案

论坛注册的代码怎么写啊?

热度:305   发布时间:2007-01-30 16:18:54.0
论坛注册的代码怎么写啊?
将注册表单分为两部分,一般注册项和高级注册项,点一下复选框显示全部注册项这个代码怎么写啊?
<%@ page contentType="text/html; charset=gb2312" language="java"%>
<!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: x-large}
-->
</style>
</head>
<script language="javascript">
function check()
{
if(register.userName.value == "")
{
alert("请输入用户名");
register.userName.focus();
return false;
}
if(register.password.value == "")
{
alert("请输入密码");
register.password.focus();
return false;
}
if(register.retype.value == "")
{
alert("请再次确认密码");
regiter.retype.focus();
return false;
}
if(register.question.value == "")
{
alert("请输入提示问题");
register.question.focus();
return false;
}
if(register.answer.value == "")
{
alert("请输入问题答案");
register.answer.focus();
return false;
}
if(register.email.value == "")
{
alert("请输入email地址");
register.email.focus();
return false;
}

return true;
}
</script>
<body>
<blockquote>
<blockquote>
<div align="center"><span class="style1">教学论坛注册</span> </div>
<form name="register" method="post" action="register.do">
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<table width="200" border="0" align="center" onclick="return ">
<tr>
<td>用户名:</td>
<td><input type="text" name="userName" width="100"></td>
<td>*</td>
</tr>
<tr>
<td>用户密码:</td>
<td><input type="text" name="password" width="100"></td>
<td>*</td>
</tr>
<tr>
<td>密码确认:</td>
<td><input type="text" name="retype" width="100"></td>
<td>*</td>
</tr>
<tr>
<td>登入问题提示:</td>
<td><select name="question" width="100">
<option value="0" selected>您最爱的宠物是?</option>
<option value="1">您最爱的老师的名字?</option>
<option value="2">您爸爸的名字是?</option>
<option value="3">您最喜欢的品牌是?</option>
<option value="4">您小学的名字是?</option>
</select></td>
<td>*</td>
</tr>
<tr>
<td>问题回答:</td>
<td><input type="text" name="answer" width="100"></td>
<td>*</td>
</tr>
<tr>
<td>email:</td>
<td><input type="text" name="email" width="100"></td>
<td>*</td>
</tr>
<tr>
<td><input name="select" type="checkbox" value="checkbox" width="100"></td>
<td>是否显示高级选项?</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>OICQ:</td>
<td><input type="text" name="OICQ" width="100"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>头像:</td>
<td><select name="image" width="100">
<option value="aoteman.jpg" selected>001</option>
<option value="haha.jpg">002</option>
</select></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>个性签名:</td>
<td><textarea name="sign"></textarea></td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="65">个人简介:</td>
<td><textarea name="recommand"></textarea></td>
<td>&nbsp;</td>
</tr>
</table>

<blockquote>
<blockquote>
<blockquote>
<blockquote>
<blockquote>
<p>&nbsp;&nbsp;
<input type="submit" name="submit" value="确定">
&nbsp;&nbsp;
<input type="reset" name="reset" value="重置">
</p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</form>
</blockquote>
</blockquote>
</body>
</html>
请教高手
搜索更多相关主题的帖子: 代码  注册  

----------------解决方案--------------------------------------------------------
用JS控制style,当选高级的时候style显示就可以了。否则style=none
----------------解决方案--------------------------------------------------------
我不会写js,css也不是最懂,所以请写出确切的代码
----------------解决方案--------------------------------------------------------

用层试下看看


----------------解决方案--------------------------------------------------------
不懂,最好给出准确的代码
----------------解决方案--------------------------------------------------------
  相关解决方案