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

                    <div class="form-group">
                        <label for="edit-feedbackTitle" class="control-label">标题:</label>
                        <input type="text" class="form-control" name="feedbackTitle" id="edit-feedbackTitle">
                    </div>
                    <div class="form-group">
                        <label for="edit-feedbackText" class="control-label">内容:</label>
                        <textarea style="height: 100px;" class="form-control" name="feedbackText" id="edit-feedbackText"></textarea>
                    </div>
                    <div class="form-group hidden">
                        <label for="edit-createTime" class="control-label">创建时间:</label>
                        <input type="text" class="form-control" name="createTime" id="edit-createTime">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-line btn-rect btn-info" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-line btn-rect btn-primary">提交</button>
                </div>
            </form>
        </div>
        let button = $(event.relatedTarget);
        let id = button.data('id');
        let modal = $(this);
        modal.find('#delete-id').val(id);
    )

    $('#modal-edit').on('show.bs.modal', function (event) 
        let button = $(event.relatedTarget);
        let id = button.data('id');
        let modal = $(this);
        $.ajax(
            url: 'feedbackGet?id=' + id,
            type: "get",
            success: function (voString) 
                let vo = eval('(' + voString + ')');
                        modal.find('#edit-id').val(vo.id);
                        modal.find('#edit-feedbackName').val(vo.feedbackName);

<!-- info -->
<div class="modal fade" id="modal-info" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <form>
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">反馈 </h4>
                </div>
                <div class="modal-body">
                    <table class="table table-striped table-hover" style="font-size: 15px;">
                        <tr>
                        <input class="form-control" type="hidden" id="searchColumn" name="searchColumn" value="feedback_name"/>
                        <input class="form-control" type="text" id="search_keyword" name="search_keyword" placeholder="反馈人"/> <span class="input-group-btn"><button class="btn btn-line btn-rect btn-danger" type="button" onclick="searchList()">搜索</button></span>
                    </div>
                </div>
                <div class="col-sm-5">
                    <button type="button" <c:if test="$loginUser.userType != '管理员'">disabled="disabled" title="没有权限!!!"</c:if> class="btn btn-line btn-rect btn-primary" data-toggle="modal" data-target="#modal-add">添加反馈 
                    </button>
                </div>
            </div>
            <br>
            <br>
            <div class="table-responsive">
                <table class="table table-striped table-hover">
                    <thead>
                    <tr>
                            <th>反馈人</th>
                            <th>电话</th>
                            <th>标题</th>
                        <th style="text-align: center;">操作</th>
                    </tr>
                    </thead>
                    </button>
                    <h4 class="modal-title">更新反馈 </h4>
                </div>
                <div class="modal-body">
                    <div class="form-group hidden">
                        <label class="control-label">(hidden)</label>
                        <input type="text" class="form-control" name="action" value="edit">
                        <input type="text" readonly class="form-control" name="id" id="edit-id">
                    </div>
                    <div class="form-group">
                        <label for="edit-feedbackName" class="control-label">反馈人:</label>
                        <input type="text" class="form-control" name="feedbackName" id="edit-feedbackName">
                    </div>
                    <div class="form-group">
                        <label for="edit-feedbackPhone" class="control-label">电话:</label>
                        <input type="text" class="form-control" name="feedbackPhone" id="edit-feedbackPhone">
<%@ 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>
                            <td><b id="info-feedbackName"></b></td>
                        </tr>
                        <tr>
                            <td style="width: 15%;">电话:</td>
                            <td><b id="info-feedbackPhone"></b></td>
                        </tr>
                        <tr>
                            <td style="width: 15%;">标题:</td>
                            <td><b id="info-feedbackTitle"></b></td>
                        </tr>
                        <tr>
                            <td style="width: 15%;">内容:</td>
                            <td><b id="info-feedbackText"></b></td>
                        </tr>
                    </table>
                    <br>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-line btn-rect btn-info" data-dismiss="modal">关闭</button>
                </div>
                        modal.find('#edit-feedbackTitle').val(vo.feedbackTitle);
                        modal.find('#edit-feedbackText').val(vo.feedbackText);
            
        )
    )
    $('#modal-info').on('show.bs.modal', function (event) 
        let button = $(event.relatedTarget);
        let id = button.data('id');
        let modal = $(this);
        $.ajax(
            url: 'feedbackGet?id=' + id,
            type: "get",
            success: function (voString) 
                let vo = eval('(' + voString + ')');
                modal.find('#info-feedbackName').text(vo.feedbackName);
                modal.find('#info-feedbackPhone').text(vo.feedbackPhone);
                modal.find('#info-feedbackTitle').text(vo.feedbackTitle);
            return false;
        
        return true;
    
    //编辑表单提交之前进行检查,如果return false,则不允许提交
    function editCheck() 
        //根据ID获取值
        if (document.getElementById("edit-feedbackName").value.trim().length == 0) 
            alert("反馈人不能为空");
            return false;
        
        if (document.getElementById("edit-feedbackPhone").value.trim().length == 0) 
            alert("电话不能为空");
            return false;
        
                <li><a href="#">欢迎:<span style="color: yellow">$loginUser.username</span></a></li>
                <li><a href="authLogout">退出</a></li>
            </ul>
        </div>
    </div>
</nav>

<div class="container-fluid">
    <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
            <!-- 侧边栏 -->
            <jsp:include page="menu.jsp">
                <jsp:param value="active" name="Feedback_active"/>
            </jsp:include>
        </div>
        <br>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <div class="row">
                <div class="col-sm-7">
            <form action="feedbackAdd" onsubmit="return addCheck()">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel">增加反馈 </h4>
                </div>
                <div class="modal-body">
                    <div class="form-group hidden">
                        <label class="control-label">(hidden)</label>
                        <input type="text" class="form-control" name="action" value="add">
                    </div>
                    <div class=以上是关于基于javaweb+jsp的户籍管理系统的主要内容,如果未能解决你的问题,请参考以下文章

基于javaweb+jsp的访客管理系统

基于javaweb+jsp的企业车辆管理系统

基于javaweb+jsp的学籍管理系统

基于javaweb+jsp的酒店管理系统

基于javaweb+jsp的学生宿舍管理系统

基于javaweb+jsp的医院住院管理系统