基于javaweb+jsp的停车场信息管理系统
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap.
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可
开发工具:idea或eclipse或myeclipse
部分代码实现JSP
<tr>
<td width="12%">车位号:td><td><input class="index-content-table-td-add" type="text" id="churuChewei" name="churuChewei" value=""/>td>
tr>
<tr>
<td width="12%">入场时间:td><td><input class="index-content-table-td-add" type="text" id="churuIndate" name="churuIndate" value=""/>td>
tr>
<tr>
<td width="12%">出场时间:td><td><input class="index-content-table-td-add" type="text" id="churuOutdate" name="churuOutdate" value=""/>td>
tr>
<tr>
<td width="12%">备注:td><td><textarea id="churuText" name="churuText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="请输入内容......">textarea>td>
tr>
table>
<br>
<br>
<th>卡号th>
<th>车位号th>
<th>入场时间th>
<th>出场时间th>
<th>备注th>
<th>操作th>
tr>
thead>
<tbody>
<c:forEach items="${list}" var="vo">
<tr class="index-content-table-td">
<td>${vo.churuName}td>
<td>${vo.churuChepai}td>
<td>${vo.churuKano}td>
<td>${vo.churuChewei}td>
<td>${vo.churuIndate}td>
<td>${vo.churuOutdate}td>
<c:choose>
<c:when test="${fn:length(vo.churuText) > 19}">
<c:out value="${fn:substring(vo.churuText, 0, 19)}..."/>
c:when>
<c:otherwise>
<c:out value="${vo.churuText}"/>
c:otherwise>
c:choose>
td>
<td>
<button class="btn btn-pill btn-info btn-sm" style="padding: 0px 1px;" onclick="window.location.href='ChuruServlet?action=get&id=${vo.id}'">详情button>
<button class="btn btn-pill btn-primary btn-sm" style="padding: 0px 1px;"
if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"c:if>
οnclick="window.location.href='ChuruServlet?action=editPre&id=${vo.id}'">编辑button>
<button class="btn btn-pill btn-warning btn-sm" style="padding: 0px 1px;" if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"c:if> οnclick="if(window.confirm('将要删除:${vo.churuName}?'))window.location.href='ChuruServlet?action=delete&id=${vo.id}'">删除button>
td>
tr>
c:forEach>
tbody>
table>
}
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"/>
head>
<body>
<jsp:include page="menu.jsp"/>
<div class="index-content">
<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>
<table class="index-content-table-add" style="font-size: 18px;">
<tr>
<td>卡号:<b>${vo.kaNo}b>td>
tr>
<tr>
<td>持卡人:<b>${vo.kaName}b>td>
tr>
<tr>
<td>性别:
return false;
}
if (document.getElementById("churuKano").value.trim().length == 0) {
alert("卡号不能为空!");
return false;
}
if (document.getElementById("churuChewei").value.trim().length == 0) {
alert("车位号不能为空!");
return false;
}
if (document.getElementById("churuIndate").value.trim().length == 0) {
alert("入场时间不能为空!");
return false;
}
if (document.getElementById("churuOutdate").value.trim().length == 0) {
alert("出场时间不能为空!");
return false;
}
<a class="info-detail">修改车位a>
<br>
<br>
div>
<br>
<form action="CheweiServlet?action=edit" method="post" onsubmit="return check()">
<input type="hidden" id="id" name="id" value="${vo.id}"/>
<table class="index-content-table-add">
<tr>
<td width="12%">车位号:td><td><input class="index-content-table-td-add" type="text" id="cheweiName" name="cheweiName" value="${vo.cheweiName}"/>td>
tr>
<tr>
<td width="12%">区域:td><td><input class="index-content-table-td-add" type="text" id="cheweiArea" name="cheweiArea" value="${vo.cheweiArea}"/>td>
tr>
<tr>
<td width="12%">状态:td>
<td>
占用中
<button type="submit" class="btn btn-pill btn-success btn-sm">提交button> <button type="button" class="btn btn-pill 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("churuName").value.trim().length == 0) {
alert("车主不能为空!");
return false;
}
if (document.getElementById("churuChepai").value.trim().length == 0) {
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" %>
<%@ 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"/>
<br>
div>
<br>
<form action="ChuruServlet?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="churuName" name="churuName" value=""/>td>
tr>
<tr>
<td width="12%">车牌号:td><td><input class="index-content-table-td-add" type="text" id="churuChepai" name="churuChepai" value=""/>td>
tr>
<tr>
<td width="12%">卡号:td><td><input class="index-content-table-td-add" type="text" id="churuKano" name="churuKano" value=""/>td>
div>
body>
<script>
function searchList() {
window.location.href = "ChuruServlet?action=list&searchColumn="+document.getElementById("searchColumn").value+"&keyword=" + document.getElementById("search_keyword").value;
}
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"/>
td>
tr>
<tr>
<td>住址:<b>${vo.kaAddress}b>td>
tr>
<tr>
<td>车牌号:<b>${vo.kaCarno}b>td>
tr>
<tr>
<td>备注:<b>${vo.kaText}b>td>
tr>
table>
<br>
<button type="button" class="btn btn-pill btn-info btn-sm" onclick="javascript:history.back(-1);">返回button>
form>
div>
body>
td>
tr>
<tr>
<td width="12%">备注:td><td><textarea id="cheweiText" name="cheweiText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="请输入内容......">${vo.cheweiText}textarea>td>
tr>
table>
<br>
<br>
<br>
<button type="submit" class="btn btn-pill btn-success btn-sm">提交button> <button type="button" class="btn btn-pill btn-info btn-sm" onclick="javascript:history.back(-1);">取消button>
form>
div>
body>
<script type="text/javascript">
//提交之前进行检查,如果return false,则不允许提交
function check() {
<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>
<div class="index-content-operation">
<button class="btn btn-pill btn-success btn-sm" if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"c:if> οnclick="window.location.href='churu_add.jsp'">添加button>
<div class="index-content-operation-search"><input id="search_keyword" placeholder="车主" type="text" name="search_keyword"/><input type="hidden" id="searchColumn" name="searchColumn" value="churu_name"/><button class="btn btn-pill btn-success btn-sm" onclick="searchList()">搜索button>div>
div>
<br>
<table class="table table-striped table-hover table-bordered">
<thead>
<tr class="index-content-table-th">
<th>车主th>
<%@ 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>
<jsp:include page="menu.jsp"/>
<div class="index-content">
<div class="index-content-operation">
<a class="info-detail">添加出入场a>
Java代码:略
运行环境
Java≥6、Tomcat≥7.0、MySQL≥5.5
开发工具
idea/eclipse/MyEclipse
技术框架
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap.
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可
开发工具:idea或eclipse或myeclipse
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
登录、注册、退出、用户模块、公告模块、车位模块、停车卡模块、出入场模块的增删改查管理
←源码获取见左侧[源码QQ]