<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<html>
<head>
<script type="text/javascript">
function userok(){
var fid=document.getElementById(fromid.user).value
//document.write("成功");
// var user=fid.events("user");
if(fid==null)
alert('用户名不能为空');
else
alert('成功');
alert('用户名不能为空');
}
</script>
</head>
<body>
<form id="fromid" name="userfrom" onsubmit="userok">
<table>
<tr>
<td align="right">用户名<td><input name="user" >*
<tr>
<td align="right">密码<td><input name="password" type="password" maxlength=8>*
<tr>
<td align="right">确认密码<td><input name="password" type="password" maxlength=8>
<tr>
<td align="right">性别
<td><input name="sexmale" type=radio value="男" checked>男
<input name="sexmale" type=radio value="女">女
<tr>
<td align="right">出生年月
<td><input name="year" type=text maxlength=4>
<select name="month">
<option>01<option>02<option>03<option>04<option>05<option>06
<option>07<option>08<option>09<option>10<option>11<option>12
</select>
<tr><td align="right">电子邮箱<td><input type="text" maxlength=20>*
<tr><td align="right">职业<td><select name="profession"><option>学生<option>教师</select>
<tr>
<td align="right" rowspan=2>个人爱好
<td><input name="favorite" type="checkbox" value=电影>电影
<input name="favorite" type="checkbox" value=音乐>音乐
<input name="favorite" type="checkbox" value=游戏>游戏
<tr><td><input name="favorite" type="checkbox" value=学习>学习
<input name="favorite" type="checkbox" value=旅游>旅游
<input name="favorite" type="checkbox" value=你猜>你猜
<tr><td align="right"rowspan=2>个人说明<td><textarea rows="8" cols="8"></textarea>
<tr><td colspan=3>
<input type=reset name="rs" value="重置"><input type=submit name="sm" value="提交" onclick="userok">
</table>
</form>
</body>
</html>
眼眸繁星