运行截图如下:
具体代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>会员注册界面</title>
<style>
table, td, th {
border: 1px solid #000000;
}
select{
width: 160px;
height: 22px;
}
</style>
</head>
<body>
<!--定义表单 form-->
<form action="#" method="post">
<h1 align="center">
用户注册
</h1>
<table align="center" width="500" align="center" cellpadding="10" cellspacing="0">
<tr>
<td><label for="username">用户名</label></td>
<td><input type="text" name="username" id="username"></td>
</tr>
<tr>
<td><label for="password">密码</label></td>
<td><input type="password" name="password" id="password"></td>
</tr>
<tr>
<td><label for="repassword">确认密码</label></td>
<td><input type="password" name="repassword" id="repassword"></td>
</tr>
<tr>
<td><label>性别</label></td>
<td><input type="radio" name="gender" value="male"> 男
<input type="radio" name="gender" value="female"> 女
</td>
</tr>
<tr>
<td><label for="email">Email</label></td>
<td><input type="email" name="email" id="email"></td>
</tr>
<tr>
<td><label for="tel">电话</label></td>
<td><input type="text" name="tel" id="tel"></td>
</tr>
<tr>
<td><label for="age">年龄</label></td>
<td><input type="text" name="age" id="age"></td>
</tr>
<tr>
<td><label for="specialty">专业</label></td>
<td><input type="text" name="specialty" id="specialty"></td>
</tr>
<tr>
<td><label for="birthday">生日</label></td>
<td><input type="date" name="birthday" id="birthday"></td>
</tr>
<tr>
<td><label for="English-level">英语等级</label></td>
<td><select id="English-level">
<option value ="4">英语四级</option>
<option value ="6">英语六级</option>
</select></td>
</tr>
<tr>
<td><label for="Hobby">爱好</label></td>
<td><input type="text" name="Hobby" id="Hobby"></td>
</tr>
<tr>
<td><label for="location">所在地</label></td>
<td><input type="text" name="location" id="location"></td>
</tr>
<tr>
<td><label for="file">文件</label></td>
<td><input type="file" name="file" id="file"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="注册">
<input type="reset" value="重置"></td>
</tr>
</table>
</form>
</body>
</html>