使用HTML与CSS技术,制作一个学生注册的页面,提交给register.jsp组件处理,能够输入如下数据项: 学号,姓名,昵称,性别,出生日期,所在院系,所选专业,班级,体育爱好(从篮球、足球、排球、羽毛球、乒乓球中多选),音乐爱好(可从钢琴、小提琴、吉他、古筝中多选),英语水平(可从优良、中等、一般中单选)。。
时间: 2023-05-31 11:03:21 浏览: 176
<!DOCTYPE html>
<html>
<head>
<title>学生注册</title>
<style type="text/css">
label {
display: block;
margin-bottom: 10px;
}
input[type="text"], select {
padding: 5px;
width: 200px;
margin-bottom: 10px;
border-radius: 5px;
border: 1px solid #ccc;
}
input[type="checkbox"] {
margin-right: 5px;
}
input[type="submit"] {
padding: 10px;
border-radius: 5px;
background-color: #007bff;
color: #fff;
border: none;
cursor: pointer;
}
</style>
</head>
<body>
<h2>学生注册</h2>
<form action="register.jsp" method="post">
<label for="studentID">学号:</label>
<input type="text" id="studentID" name="studentID" required>
<label for="name">姓名:</label>
<input type="text" id="name" name="name" required>
<label for="nickname">昵称:</label>
<input type="text" id="nickname" name="nickname">
<label>性别:</label>
<input type="radio" name="gender" value="male" id="male"><label for="male">男</label>
<input type="radio" name="gender" value="female" id="female"><label for="female">女</label>
<label for="birthdate">出生日期:</label>
<input type="date" id="birthdate" name="birthdate">
<label for="department">所在院系:</label>
<select id="department" name="department">
<option value="engineering">工学院</option>
<option value="science">理学院</option>
<option value="management">管理学院</option>
</select>
<label for="major">所选专业:</label>
<select id="major" name="major">
<option value="computer">计算机科学与技术</option>
<option value="mechanical">机械工程</option>
<option value="physics">物理学</option>
</select>
<label for="class">班级:</label>
<input type="text" id="class" name="class">
<label>体育爱好:</label>
<input type="checkbox" name="sports[]" value="basketball" id="basketball"><label for="basketball">篮球</label>
<input type="checkbox" name="sports[]" value="football" id="football"><label for="football">足球</label>
<input type="checkbox" name="sports[]" value="volleyball" id="volleyball"><label for="volleyball">排球</label>
<input type="checkbox" name="sports[]" value="badminton" id="badminton"><label for="badminton">羽毛球</label>
<input type="checkbox" name="sports[]" value="tableTennis" id="tableTennis"><label for="tableTennis">乒乓球</label>
<label>音乐爱好:</label>
<input type="checkbox" name="music[]" value="piano" id="piano"><label for="piano">钢琴</label>
<input type="checkbox" name="music[]" value="violin" id="violin"><label for="violin">小提琴</label>
<input type="checkbox" name="music[]" value="guitar" id="guitar"><label for="guitar">吉他</label>
<input type="checkbox" name="music[]" value="guzheng" id="guzheng"><label for="guzheng">古筝</label>
<label for="english">英语水平:</label>
<select id="english" name="english">
<option value="excellent">优良</option>
<option value="medium">中等</option>
<option value="general">一般</option>
</select>
<input type="submit" value="提交">
</form>
</body>
</html>
阅读全文