基于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
<br/>
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>车位号</th>
<th>区域</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<c:forEach items="${list}" var="vo">
<tr>
<td><a href="cheweiGet?id=${vo.id}">${vo.cheweiName}</a></td>
<td>${vo.cheweiArea}</td>
if (document.getElementById("cheweiName").value.trim().length == 0) {
alert("车位号不能为空!");
return false;
}
if (document.getElementById("cheweiArea").value.trim().length == 0) {
alert("区域不能为空!");
return false;
}
return true;
}
</script>
</html>
<%@ 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" %>
</ul>
<br/>
<form class="form-horizontal" role="form" action="cheweiAdd" 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="cheweiName" name="cheweiName">
</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="cheweiArea" name="cheweiArea">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-5">
<input name="cheweiStatus" type="radio" value="占用中" checked="checked"/> 占用中
<input name="cheweiStatus" type="radio" value="空闲"/> 空闲
<body>
<div class="container-fluid">
<ul class="nav nav-tabs">
<li><a href="cheweiList">车位列表</a></li>
<li class="active"><a href="#">编辑</a></li>
</ul>
<br/>
<form class="form-horizontal" role="form" action="cheweiEdit" 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="cheweiName" name="cheweiName" value="${vo.cheweiName}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">区域:</label>
<div class="col-sm-5">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-5" style="padding-top: 7px;">
${vo.cheweiStatus}
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-5" style="padding-top: 7px;">
<textarea rows="3" class="form-control" id="cheweiText" name="cheweiText" disabled="disabled">${vo.cheweiText}</textarea>
</div>
</div>
<td>
<button onclick="window.location.href='cheweiEditPre?id=${vo.id}'"
class="btn btn-line btn-warning btn-xs"
<c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if>
>
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
编辑
</button>
<button onclick="if(window.confirm('将要删除:${vo.cheweiName}?'))window.location.href='cheweiDelete?id=${vo.id}'"
class="btn btn-line btn-warning btn-xs"
<c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> >
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-5">
<textarea rows="3" class="form-control" id="cheweiText" name="cheweiText" placeholder="请输入内容......"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-5">
<input type="submit" class="btn btn-line btn-default btn-sm" value="保存">
<input type="button" class="btn btn-line btn-danger btn-sm" value="返回" onclick="javascript:history.back(-1);">
</div>
</div>
</form>
</div>
</body>
<script type="text/javascript">
//提交之前进行检查,如果return false,则不允许提交
function check() {
<label class="col-sm-3 control-label"></label>
<div class="col-sm-5" style="padding-top: 7px;">
<input type="button" class="btn btn-line btn-danger btn-sm" value="返回" onclick="javascript:history.back(-1);">
</div>
</div>
</form>
</div>
</body>
</html>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%@ 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="cheweiList?">车位列表</a></li>
if (document.getElementById("cheweiArea").value.trim().length == 0) {
alert("区域不能为空!");
return false;
}
return true;
}
</script>
</html>
<%@ 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>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-5">
<input name="cheweiStatus" type="radio" value="占用中" ${vo.cheweiStatus=='占用中'?'checked':''}/> 占用中
<input name="cheweiStatus" type="radio" value="空闲" ${vo.cheweiStatus=='空闲'?'checked':''}/> 空闲
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-5">
<textarea rows="3" class="form-control" id="cheweiText" name="cheweiText" placeholder="请输入内容......">${vo.cheweiText}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<%@ include file="include/head.jsp" %>
</head>
<body>
<div class="container-fluid">
<ul class="nav nav-tabs">
<li class="active"><a href="cheweiList">车位列表</a></li>
<c:if test="${loginUser.userType == '管理员'}"><li><a href="chewei_add.jsp">添加</a></li></c:if>
</ul>
<br/>
<form class="form-inline" id="searchForm" action="cheweiList" method="post">
<div class="form-group">
<input type="text" class="form-control" name="keyword" id="keyword" placeholder="车位号">
<input type="hidden" id="searchColumn" name="searchColumn" value="chewei_name"/>
</div>
<button class="btn btn-line btn-warning btn-sm"><span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询
</button>
<div class="container-fluid">
<ul class="nav nav-tabs">
<li><a href="cheweiList">用户列表</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.cheweiName}
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">区域:</label>
<div class="col-sm-5" style="padding-top: 7px;">
<input type="submit" class="btn btn-line btn-default btn-sm" value="保存">
<input type="button" class="btn btn-line btn-danger btn-sm" value="返回" onclick="javascript:history.back(-1);">
</div>
</div>
</form>
</div>
</body>
<script type="text/javascript">
//提交之前进行检查,如果return false,则不允许提交
function check() {
//根据ID获取值
if (document.getElementById("cheweiName").value.trim().length == 0) {
alert("车位号不能为空!");
return false;
</button>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div style="float: right;padding-right: 10px;color: #515151;"><jsp:include page="split.jsp"/></div>
</div>
</body>
Java代码:略
运行环境
Java≥6、Tomcat≥7.0、MySQL≥5.5
开发工具
idea/eclipse/MyEclipse
技术框架
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架…均可
开发工具:idea或eclipse或myeclipse
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
登录、注册、退出、用户模块、公告模块、车位模块、停车卡模块、出入场模块的增删改查管理