于javaweb+jsp的驾校信息管理系统
Posted javayms
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了于javaweb+jsp的驾校信息管理系统相关的知识,希望对你有一定的参考价值。
基于javaweb+jsp的驾校信息管理系统
JavaWeb JavaBean JSP MVC mysql Tomcat javascript
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架…均可
开发工具:idea或eclipse或myeclipse
部分代码实现JSP
return true;
</script>
</html>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>修改教练</title>
<link rel="stylesheet" type="text/css" href="css/index.css"/>
alert("姓名不能为空!");
return false;
if (document.getElementById("jiaolianAge").value.trim().length == 0)
alert("年龄不能为空!");
return false;
if (document.getElementById("jiaolianCar").value.trim().length == 0)
alert("所用车辆不能为空!");
return false;
if (document.getElementById("jiaolianPhone").value.trim().length == 0)
alert("联系方式不能为空!");
return false;
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<b>$vo.jiaolianSex</b>
</td>
</tr>
<tr>
<td>年龄:<b>$vo.jiaolianAge</b></td>
</tr>
<tr>
<td>所用车辆:<b>$vo.jiaolianCar</b></td>
</tr>
<tr>
<td>联系方式:<b>$vo.jiaolianPhone</b></td>
</tr>
<tr>
<td>备注:<b>$vo.jiaolianText</b></td>
if (document.getElementById("jiaolianAge").value.trim().length == 0)
alert("年龄不能为空!");
return false;
if (document.getElementById("jiaolianCar").value.trim().length == 0)
alert("所用车辆不能为空!");
return false;
if (document.getElementById("jiaolianPhone").value.trim().length == 0)
alert("联系方式不能为空!");
return false;
<input name="jiaolianSex" type="radio" value="男" checked="checked"/> 男
<input name="jiaolianSex" type="radio" value="女"/> 女
</td>
</tr>
<tr>
<td width="12%">年龄:</td><td><input class="index-content-table-td-add" type="text" id="jiaolianAge" name="jiaolianAge" value=""/></td>
</tr>
<tr>
<td width="12%">所用车辆:</td><td><input class="index-content-table-td-add" type="text" id="jiaolianCar" name="jiaolianCar" value=""/></td>
</tr>
<tr>
<td width="12%">联系方式:</td><td><input class="index-content-table-td-add" type="text" id="jiaolianPhone" name="jiaolianPhone" value=""/></td>
</tr>
<tr>
<td width="12%">备注:</td><td><textarea id="jiaolianText" name="jiaolianText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="请输入内容......"></textarea></td>
</tr>
</tr>
</thead>
<tbody>
<c:forEach items="$list" var="vo">
<tr class="index-content-table-td">
<td>$vo.jiaolianNo</td>
<td>$vo.jiaolianName</td>
<td>$vo.jiaolianSex</td>
<td>$vo.jiaolianAge</td>
<td>$vo.jiaolianCar</td>
<td>$vo.jiaolianPhone</td>
<td>
<button class="btn btn-grad btn-info btn-sm" style="padding: 0px 1px;" onclick="window.location.href='JiaolianServlet?action=get&id=$vo.id'">详情</button>
<button class="btn btn-grad btn-warning btn-sm" style="padding: 0px 1px;"
<c:if test="$loginUser.userType != '管理员'">disabled="disabled" title="没有权限!!!"</c:if>
οnclick="window.location.href='JiaolianServlet?action=editPre&id=$vo.id'">编辑</button>
<button class="btn btn-grad btn-success btn-sm" style="padding: 0px 1px;" <c:if test="$loginUser.userType != '管理员'">disabled="disabled" title="没有权限!!!"</c:if> οnclick="if(window.confirm('将要删除:$vo.jiaolianName?'))window.location.href='JiaolianServlet?action=delete&id=$vo.id'">删除</button>
</td>
</table>
<br>
<button type="button" class="btn btn-grad btn-info btn-sm" onclick="javascript:history.back(-1);">返回</button>
</form>
</div>
</body>
</html>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>教练管理</title>
<link rel="stylesheet" type="text/css" href="css/index.css"/>
</head>
<body>
<br>
</div>
<br>
<form>
<table class="index-content-table-add" style="font-size: 18px;">
<tr>
<td>教练编号:<b>$vo.jiaolianNo</b></td>
</tr>
<tr>
<td>姓名:<b>$vo.jiaolianName</b></td>
</tr>
<tr>
<link rel="stylesheet" type="text/css" href="css/index.css"/>
</head>
<body>
<jsp:include page="menu.jsp"/>
<div class="index-content">
<div class="index-content-operation">
<a class="info-detail">添加教练</a>
<br>
<br>
</div>
<br>
<form action="JiaolianServlet?action=add" method="post" onsubmit="return check()">
<table class="index-content-table-add">
<tr>
<td width="12%">教练编号:</td><td><input class="index-content-table-td-add" type="text" id="jiaolianNo" name="jiaolianNo" value=""/></td>
</tr>
<tr>
<td width="12%">姓名:</td><td><input class="index-content-table-td-add" type="text" id="jiaolianName" name="jiaolianName" value=""/></td>
</tr>
<tr>
<td width="12%">性别:</td>
<body>
<jsp:include page="menu.jsp"/>
<div class="index-content">
<div class="index-content-operation">
<a class="info-detail">修改教练</a>
<br>
<br>
</div>
<br>
<form action="JiaolianServlet?action=edit" method="post" onsubmit="return check()">
<input type="hidden" id="id" name="id" value="$vo.id"/>
<br>
<br>
<br>
<button type="submit" class="btn btn-grad btn-default btn-sm">提交</button> <button type="button" class="btn btn-grad btn-info btn-sm" onclick="javascript:history.back(-1);">取消</button>
</form>
</div>
</body>
<script type="text/javascript">
//提交之前进行检查,如果return false,则不允许提交
function check()
//根据ID获取值
if (document.getElementById("jiaolianNo").value.trim().length == 0)
alert("教练编号不能为空!");
return false;
if (document.getElementById("jiaolianName").value.trim().length == 0)
alert("姓名不能为空!");
<div class="index-content">
<div class="index-content-operation">
<a class="info-detail">教练管理</a>
<br>
<br>
</div>
<br>
<div class="index-content-operation">
<button class="btn btn-grad btn-default btn-sm" <c:if test="$loginUser.userType != '管理员'">disabled="disabled" title="没有权限!!!"</c:if> οnclick以上是关于于javaweb+jsp的驾校信息管理系统的主要内容,如果未能解决你的问题,请参考以下文章