基于javaweb+jsp的学籍管理系统
Posted qq_1742826239
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了基于javaweb+jsp的学籍管理系统相关的知识,希望对你有一定的参考价值。
基于javaweb+jsp的学籍管理系统
JavaWeb JavaBean JSP MVC mysql Tomcat javascript idea eclipse MyEclipse Servlet SSM Maven …
部分代码实现JSP
if (document.getElementById("studentClass").value.trim().length == 0)
alert("班级不能为空!");
return false;
if (document.getElementById("studentLevel").value.trim().length == 0)
alert("学历不能为空!");
return false;
return true;
</script>
</html>
</form>
<br/>
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>学号</th>
<th>姓名</th>
<th>性别</th>
<th>年龄</th>
<th>籍贯</th>
<th>联系方式</th>
<th>专业</th>
<th>班级</th>
<th>学历</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<c:forEach items="$list" var="vo">
<input name="studentSex" type="radio" value="男" checked="checked"/> 男
<input name="studentSex" type="radio" value="女"/> 女
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">年龄:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="studentAge" name="studentAge">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">籍贯:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="studentHometown" name="studentHometown">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系方式:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="studentPhone" name="studentPhone">
</div>
<br/>
<form class="form-horizontal" role="form" action="studentEdit" method="post" onsubmit="return check()">
<input type="hidden" class="form-control" id="id" name="id" value="$vo.id"/>
<div class="form-group">
<label class="col-sm-3 control-label">学号:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="studentNo" name="studentNo" value="$vo.studentNo">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="studentName" name="studentName" value="$vo.studentName">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="col-sm-5">
<input name="studentSex" type="radio" value="男" $vo.studentSex=='男'?'checked':''/> 男
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>学籍 编辑</title>
<%@ include file="include/head.jsp" %>
</head>
<body>
<div class="container-fluid">
<ul class="nav nav-tabs">
<li><a href="studentList">学籍 列表</a></li>
<li class="active"><a href="#">编辑</a></li>
</form>
</div>
</body>
<script type="text/javascript">
//提交之前进行检查,如果return false,则不允许提交
function check()
//根据ID获取值
if (document.getElementById("studentNo").value.trim().length == 0)
alert("学号不能为空!");
return false;
if (document.getElementById("studentName").value.trim().length == 0)
alert("姓名不能为空!");
return false;
if (document.getElementById("studentHometown").value.trim().length == 0)
alert("籍贯不能为空!");
return false;
if (document.getElementById("studentPhone").value.trim().length == 0)
alert("联系方式不能为空!");
return false;
if (document.getElementById("studentMajor").value.trim().length == 0)
alert("专业不能为空!");
return false;
if (document.getElementById("studentClass").value.trim().length == 0)
alert("班级不能为空!");
return false;
<form class="form-horizontal" role="form" action="studentAdd" method="post" onsubmit="return check()">
<div class="form-group">
<label class="col-sm-3 control-label">学号:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="studentNo" name="studentNo">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="studentName" name="studentName">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
//提交之前进行检查,如果return false,则不允许提交
function check()
//根据ID获取值
if (document.getElementById("studentNo").value.trim().length == 0)
alert("学号不能为空!");
return false;
if (document.getElementById("studentName").value.trim().length == 0)
alert("姓名不能为空!");
return false;
if (document.getElementById("studentAge").value.trim().length == 0)
alert("年龄不能为空!");
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">年龄:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="studentAge" name="studentAge" value="$vo.studentAge">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">籍贯:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="studentHometown" name="studentHometown" value="$vo.studentHometown">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系方式:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="studentPhone" name="studentPhone" value="$vo.studentPhone">
</div>
<body>
<div class="container-fluid">
<ul class="nav nav-tabs">
<li><a href="studentList">用户列表</a></li>
<li class="active"><a href="#">详情</a></li>
</ul>
<br/>
<form class="form-horizontal" role="form" action="#" method="post">
<input type="hidden" class="form-control" id="id" name="id" value="$vo.id"/>
<div class="form-group">
<label class="col-sm-3 control-label">学号:</label>
<div class="col-sm-5" style="padding-top: 7px;">
$vo.studentNo
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-5" style="padding-top: 7px;">
$vo.studentName
</div>
<input type="button" class="btn btn-grad btn-success btn-sm" value="返回" onclick="javascript:history.back(-1);">
</div>
</div>
</form>
基于SSM实现学籍管理系统