基于javaweb+jsp的实验室管理系统

基于javaweb+jsp的实验室管理系统

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript idea eclipse MyEclipse Servlet SSM Maven …

部分代码实现JSP

        <table class="index-content-table-add">
            <tr>
                <td width="12%">名称:td><td><input class="index-content-table-td-add" type="text" id="shebeiName" name="shebeiName" value=""/>td>
            tr>
            <tr>
                <td width="12%">所属实验室:td><td><input class="index-content-table-td-add" type="text" id="shebeiShiyanshi" name="shebeiShiyanshi" value=""/>td>
            tr>
            <tr>
                <td width="12%">数量:td><td><input class="index-content-table-td-add" type="text" id="shebeiShuliang" name="shebeiShuliang" value=""/>td>
            tr>
            <tr>
                <td width="12%">状态:td>
                <td>
                        <input name="shebeiZhuangtai" type="radio" value="充足" checked="checked"/>   充足    
                        <input name="shebeiZhuangtai" type="radio" value="短缺"/>   短缺    
                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"/>
    <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>
    div>
    <br>
    <form action="shebeiEdit" 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="shebeiName" name="shebeiName" value="${vo.shebeiName}"/>td>
            tr>
            <tr>
                <td width="12%">所属实验室:td><td><input class="index-content-table-td-add" type="text" id="shebeiShiyanshi" name="shebeiShiyanshi" value="${vo.shebeiShiyanshi}"/>td>
            tr>
            <tr>
                <td width="12%">数量:td><td><input class="index-content-table-td-add" type="text" id="shebeiShuliang" name="shebeiShuliang" value="${vo.shebeiShuliang}"/>td>
            tr>
    <form>
        <table class="index-content-table-add" style="font-size: 18px;">
            <tr>
                <td>名称:<b>${vo.shebeiName}b>td>
            tr>
            <tr>
                <td>所属实验室:<b>${vo.shebeiShiyanshi}b>td>
            tr>
            <tr>
                <td>数量:<b>${vo.shebeiShuliang}b>td>
            tr>
            <tr>
                <td>状态:
                    <b>${vo.shebeiZhuangtai}b>
                td>
<%@ 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>
        <br>
<%@ 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>
        c:forEach>
        tbody>
    table>
    <div style="float: right;padding-right: 10px;color: #515151;"><jsp:include page="split.jsp"/>div>
div>
body>
<script>
    function searchList() {
       
        window.location.href = "shebeiList?searchColumn="+document.getElementById("searchColumn").value+"&keyword=" + document.getElementById("search_keyword").value;
    }
script>
<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>
    <div class="index-content-operation">
        <button class="btn btn-rect btn-grad btn-info btn-sm" if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"c:if> οnclick="window.location.href='shebei_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="shebei_name"/><button class="btn btn-rect btn-grad btn-warning btn-sm" onclick="searchList()">搜索button>div>
    div>
    <br>
    <table class="table table-striped table-hover table-bordered">
        <thead>
                <td width="12%">状态:td>
                <td>
                      充足    
                      短缺    
                td>
            tr>
            <tr>
                <td width="12%">备注:td><td><textarea id="shebeiText" name="shebeiText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="请输入内容......">${vo.shebeiText}textarea>td>
            tr>
        table>
        <br>
        <br>
        <br>
           <button type="submit" class="btn btn-rect btn-grad btn-info btn-sm">提交button>        <button type="button" class="btn btn-rect btn-grad btn-danger btn-sm" onclick="javascript:history.back(-1);">取消button>
    form>
div>

body>
<script type="text/javascript">
        //根据ID获取值
        if (document.getElementById("shebeiName").value.trim().length == 0) {
            alert("名称不能为空!");
            return false;
        }
        if (document.getElementById("shebeiShiyanshi").value.trim().length == 0) {
            alert("所属实验室不能为空!");
            return false;
        }
        if (document.getElementById("shebeiShuliang").value.trim().length == 0) {
            alert("数量不能为空!");
            return false;
        }
        return true;
    }
script>
html>

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
            <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.shebeiName}td>
                <td>${vo.shebeiShiyanshi}td>
                <td>${vo.shebeiShuliang}td>
                <td>${vo.shebeiZhuangtai}td>
                <td>
                    <button class="btn btn-rect btn-grad btn-danger btn-sm" style="padding: 0px 1px;" onclick="window.location.href='shebeiGet?id=${vo.id}'">详情button> 
                    <button class="btn btn-rect btn-grad btn-warning btn-sm" style="padding: 0px 1px;"
                            if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"c:if>
                    οnclick="window.location.href='shebeiEditPre?id=${vo.id}'">编辑button> 
                    <button class="btn btn-rect btn-grad btn-default btn-sm" style="padding: 0px 1px;" if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"c:if> οnclick="if(window.confirm('将要删除:${vo.shebeiName}?'))window.location.href='shebeiDelete?id=${vo.id}'">删除button>
                td>
            <tr>
                <td>备注:<b>${vo.shebeiText}b>td>
            tr>
        table>
        <br>
        <button type="button" class="btn btn-rect btn-grad btn-danger 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>
            <tr>
                    <td width="12%">备注:td><td><textarea id="shebeiText" name="shebeiText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="请输入内容......">textarea>td>
            tr>
        table>
        <br>
        <br>
        <br>
           <button type="submit" class="btn btn-rect btn-grad btn-info btn-sm">提交button>        <button type="button" class="btn btn-rect btn-grad btn-danger btn-sm" onclick="javascript:history.back(-1);">取消button>
    form>
div>

body>
<script type="text/javascript">
    //提交之前进行检查,如果return false,则不允许提交
    function check() {
        //根据ID获取值
        if (document.getElementById("shebeiName").value.trim().length == 0) {
            alert("名称不能为空!");
            return false;
        }
        if (document.getElementById("shebeiShiyanshi").value.trim().length == 0) {
            alert("所属实验室不能为空!");
            return false;
        }
        if (document.getElementById("shebeiShuliang").value.trim().length == 0) {
            alert("数量不能为空!");
            return false;
        }
        return true;
    }
script>
    <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>

运行环境

Java≥6、Tomcat≥7.0、MySQL≥5.5

开发工具

idea/eclipse/MyEclipse

技术框架

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript idea eclipse MyEclipse Servlet SSM Maven …

适用

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

功能说明

登录、注册、退出、用户模块、公告模块、设备模块、实验室模块、维修模块的增删改查管理

基于javaweb+jsp的实验室管理系统_第1张图片

基于javaweb+jsp的实验室管理系统_第2张图片

基于javaweb+jsp的实验室管理系统_第3张图片

基于javaweb+jsp的实验室管理系统_第4张图片

基于javaweb+jsp的实验室管理系统_第5张图片

document

你可能感兴趣的:(tomcat,jsp,javaweb,servlet/ssm,mysql)