基于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

            </tr>
            <tr>
                <td>要求:<b>${vo.fenleiYaoqiu}</b></td>
            </tr>
            <tr>
                <td>常见垃圾:<b>${vo.fenleiCangjian}</b></td>
            </tr>
            <tr>
                <td>备注:<b>${vo.fenleiText}</b></td>
            </tr>
        </table>
        <br>
        <button type="button" class="btn btn-rect 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" %>
        <br>
        <br>
        &nbsp;&nbsp;&nbsp;<button type="submit" class="btn btn-rect btn-grad btn-success btn-sm">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button type="button" class="btn btn-rect 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("fenleiName").value.trim().length == 0) {
                <td>${vo.fenleiName}</td>
                <td>${vo.fenleiSuoming}</td>
                <td>${vo.fenleiYaoqiu}</td>
                <td>${vo.fenleiCangjian}</td>
                <td>
                    <button class="btn btn-rect btn-grad btn-info btn-sm" style="padding: 0px 1px;" onclick="window.location.href='fenleiGet?id=${vo.id}'">详情</button>&nbsp;
                    <button class="btn btn-rect btn-grad btn-warning btn-sm" style="padding: 0px 1px;"
                            <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if>
                    οnclick="window.location.href='fenleiEditPre?id=${vo.id}'">编辑</button>&nbsp;
                    <button class="btn btn-rect btn-grad btn-info btn-sm" style="padding: 0px 1px;" <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> οnclick="if(window.confirm('将要删除:${vo.fenleiName}?'))window.location.href='fenleiDelete?id=${vo.id}'">删除</button>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div style="float: right;padding-right: 10px;color: #515151;"><jsp:include page="split.jsp"/></div>
</div>
<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.fenleiName}</b></td>
            </tr>
            <tr>
<script>
    function searchList() {
        window.location.href = "fenleiList?searchColumn="+document.getElementById("searchColumn").value+"&keyword=" + document.getElementById("search_keyword").value;
    }
</script>
<!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>
        <br>
        <br>
    </div>
    <br>
                <td width="12%">说明:</td><td><input class="index-content-table-td-add" type="text" id="fenleiSuoming" name="fenleiSuoming" value=""/></td>
            </tr>
            <tr>
                <td width="12%">要求:</td><td><input class="index-content-table-td-add" type="text" id="fenleiYaoqiu" name="fenleiYaoqiu" value=""/></td>
            </tr>
            <tr>
                <td width="12%">常见垃圾:</td><td><input class="index-content-table-td-add" type="text" id="fenleiCangjian" name="fenleiCangjian" value=""/></td>
            </tr>
            <tr>
                    <td width="12%">备注:</td><td><textarea id="fenleiText" name="fenleiText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="请输入内容......"></textarea></td>
            </tr>
        </table>
        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>
            <tr>
                <td width="12%">说明:</td><td><input class="index-content-table-td-add" type="text" id="fenleiSuoming" name="fenleiSuoming" value="${vo.fenleiSuoming}"/></td>
            </tr>
            <tr>
                <td width="12%">要求:</td><td><input class="index-content-table-td-add" type="text" id="fenleiYaoqiu" name="fenleiYaoqiu" value="${vo.fenleiYaoqiu}"/></td>
            </tr>
            <tr>
                <td width="12%">常见垃圾:</td><td><input class="index-content-table-td-add" type="text" id="fenleiCangjian" name="fenleiCangjian" value="${vo.fenleiCangjian}"/></td>
            </tr>
            <tr>
                <td width="12%">备注:</td><td><textarea id="fenleiText" name="fenleiText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="请输入内容......">${vo.fenleiText}</textarea></td>
            </tr>
        </table>
        <br>
        <br>
        <br>
        &nbsp;&nbsp;&nbsp;<button type="submit" class="btn btn-rect btn-grad btn-success btn-sm">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button type="button" class="btn btn-rect btn-grad btn-info btn-sm" onclick="javascript:history.back(-1);">取消</button>
    </form>
</div>
    <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>
        <br>
        <br>
    </div>
    <br>
    <form action="fenleiEdit" 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="fenleiName" name="fenleiName" value="${vo.fenleiName}"/></td>
<%@ 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"/>
        <button class="btn btn-rect btn-grad btn-success btn-sm" <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> οnclick="window.location.href='fenlei_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="fenlei_name"/><button class="btn btn-rect btn-grad 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>
            <th>说明</th>
            <th>要求</th>
            <th>常见垃圾</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${list}" var="vo">
        }
        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"/>
    <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="fenleiAdd" 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="fenleiName" name="fenleiName" value=""/></td>
            </tr>
</body>
<script type="text/javascript">
    //提交之前进行检查,如果return false,则不允许提交
    function check() {
        //根据ID获取值
        if (document.getElementById("fenleiName").value.trim().length == 0) {
            alert("分类名称不能为空!");
            return false;
        }
        if (document.getElementById("fenleiSuoming").value.trim().length == 0) {
            alert("说明不能为空!");
            return false;
        }
        if (document.getElementById("fenleiYaoqiu").value.trim().length == 0) {
            alert("要求不能为空!");
            return false;
        }
        if (document.getElementById("fenleiCangjian").value.trim().length == 0) {
            alert("常见垃圾不能为空!");
            return false;
        }
        if (document.getElementById("fenleiSuoming").value.trim().length == 0) {
            alert("说明不能为空!");
            return false;
        }
        if (document.getElementById("fenleiYaoqiu").value.trim().length == 0) {
            alert("要求不能为空!");
            return false;
        }
        if (document.getElementById("fenleiCangjian").value.trim().length == 0) {
            alert("常见垃圾不能为空!");
            return false;

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

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

登录、注册、退出、用户模块、公告模块、分类模块、垃圾模块的增删改查管理

基于javaweb+jsp的垃圾分类查询管理系统

基于javaweb+jsp的垃圾分类查询管理系统

基于javaweb+jsp的垃圾分类查询管理系统

基于javaweb+jsp的垃圾分类查询管理系统

基于javaweb+jsp的垃圾分类查询管理系统

基于javaweb+jsp的垃圾分类查询管理系统

基于javaweb+jsp的垃圾分类查询管理系统

基于javaweb+jsp的垃圾分类查询管理系统

基于javaweb+jsp的垃圾分类查询管理系统

基于javaweb+jsp的垃圾分类查询管理系统

基于javaweb+jsp的垃圾分类查询管理系统

基于javaweb+jsp的垃圾分类查询管理系统

上一篇:div设计中的文字垂直居中的方法


下一篇:JavaWeb - JavaScript