资讯专栏INFORMATION COLUMN

基于javaweb+jsp的学生成绩管理系统

番茄西红柿 / 3166人阅读

基于javaweb+jsp的学生成绩管理系统

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

部分代码实现JSP

        let editIndex = layedit.build('LAY_demo_editor');        //自定义验证规则        form.verify({            content: function (value) {                layedit.sync(editIndex);            }        });        //监听提交        form.on('submit(submit-button)', function (data) {            $.post("ScoreServlet?action=edit&", data.field, function () {                let index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引                parent.layer.close(index); //再执行关闭
        <div class="layui-input-block">            <input type="text" name="scoreScore" lay-verify="required|scoreScore" class="layui-input" value="${vo.scoreScore}">        div>    div>    <div class="layui-form-item">        <label class="layui-form-label">备注:label>        <div class="layui-input-block">            <textarea type="text" name="scoreText" class="layui-input" style="height: 100px;padding-left: 10px;" placeholder="请输入内容......">${vo.scoreText}textarea>        div>    div>    <div class="layui-form-item">        <div class="layui-input-block">            <button type="submit" class="layui-btn" lay-submit="" lay-filter="submit-button">保存button>            <button type="reset" class="layui-btn layui-btn-primary">重置button>        div>    div>form><script src="js/layui/layui.js" charset="utf-8">script><script>    layui.use(['form', 'layedit', 'laydate'], function () {        let form = layui.form, layer = layui.layer, layedit = layui.layedit;
                        }                    }                ]            ],        });        //监听工具条        table.on('tool(myTable)', function (obj) { //注:tool 是工具条事件名,myTable 是 table 原始容器的属性 lay-filter="对应的值"            let data = obj.data; //获得当前行数据            let layEvent = obj.event; //获得 lay-event 对应的值(也可以是表头的 event 参数对应的值)            if (layEvent === 'del') { //删除                // layer.confirm('删除' + data.scoreName + "?", function (index) {                $.ajax({                    type: "GET",                    dataType: "text",                    url: "ScoreServlet?action=delete&id=" + data.id,                    success: function () {                        console.log("已删除!");
    div>    <div class="layui-form-item">        <label class="layui-form-label">分数:label>        <div class="layui-input-block" style="padding: 9px 15px;">            ${vo.scoreScore}        div>    div>    <div class="layui-form-item">        <label class="layui-form-label">备注:label>        <div class="layui-input-block">            <textarea type="text" name="scoreText" disabled="disabled" class="layui-input" style="height: 100px;padding-left: 10px;" placeholder="请输入内容......">${vo.scoreText}textarea>        div>    div>form><script src="js/layui/layui.js" charset="utf-8">script><script>    layui.use(['form', 'layedit', 'laydate'], function () {        let form = layui.form, layer = layui.layer, layedit = layui.layedit;        //创建一个编辑器        let editIndex = layedit.build('LAY_demo_editor');
            }, "text");//这里用的是post提交,如果不懂可以参考JQuery中ajax提            return false;        });    });script>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" %><html><head>    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width, initial-scale=1.0">
script><script type="text/html" id="myToolbar">    <div class="layui-btn-container">        <c:if test="${loginUser.userType == '管理员'}"><button class='layui-btn layui-btn-sm' lay-event='add'>添加</button></c:if>    </div>script><script>    function arrayBufferToBase64(buffer) {        let binary = '';        let bytes = new Uint8Array(buffer);        let len = bytes.byteLength;        for (let i = 0; i < len; i++) {            binary += String.fromCharCode(bytes[i]);        }        return window.btoa(binary);    }
    <div class="layui-form-item">        <label class="layui-form-label">学科:label>        <div class="layui-input-block">            <input type="text" name="scoreSubject" lay-verify="required|scoreSubject" class="layui-input" value="${vo.scoreSubject}">        div>    div>    <div class="layui-form-item">        <label class="layui-form-label">教师:label>        <div class="layui-input-block">            <input type="text" name="scoreTeacher" lay-verify="required|scoreTeacher" class="layui-input" value="${vo.scoreTeacher}">        div>    div>    <div class="layui-form-item">
                <button class="layui-btn" data-type="reload">搜索button>            div>        div>                <table class="layui-hide" id="myData" lay-filter="myTable">table>    div>div><script src="js/layui/layui.js"/><script>    //JavaScript代码区域    layui.use('element', function () {        let element = layui.element;
script>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" %><html><head>    <meta charset="utf-8">    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">    <title>学生成绩管理系统title>    <link rel="stylesheet" href="js/layui/css/layui.css">
                        },                        {                            field: 'scoreTeacher',                            title: '教师',                        },                        {                            field: 'scoreScore',                            title: '分数',                        },                        {                            field: 'scoreText',                            title: '备注',                        },                    {                        align: 'center',                        fixed: 'right',                        title: '操作',                        width: 130,                        templet: vo => {                            let flag = ${loginUser.userType == '管理员'};
                    content: 'score_add.jsp'                });            } else {                //layer.alert('这是工具栏右侧自定义的一个图标按钮');            }        });        //搜索        let $ = layui.$, active = {            reload: function () {                let url = 'ScoreServlet?action=list&keyword=' + $('#search_keyword').val() + '&searchColumn=' + $('#searchColumn').val();                //执行重载                table.reload('myTable', {                    url: url,                    page: {                        curr: 1 //重新从第 1 页开始                    }                });            }        };        $('.searchTable .layui-btn').on('click', function () {            let type = $(this).data('type');
    div>    <div class="layui-side layui-bg-black">        <div class="layui-side-scroll">            <ul class="layui-nav layui-nav-tree" lay-filter="test">                                <jsp:include page="menu.jsp">                    <jsp:param value="active" name="Score_active"/>                jsp:include>            ul>        div>    div>    <div class="layui-body">        <div class="search_style" style="padding-top: 10px;padding-left: 15px;">            <div class="searchTable">                搜索:                <div class="layui-inline">                    <input class="layui-input" name="search_keyword" id="search_keyword" autocomplete="off" placeholder="姓名">                    <input type="hidden" class="layui-input" name="searchColumn" id="searchColumn" autocomplete="off" value="score_name">
<%@ 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" %><html><head>    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width, initial-scale=1.0">    <title>修改成绩 title>    <script src="js/jquery.js">script>    <link rel="stylesheet" href="js/layui/css/layui.css">head><body style="padding: 20px">
    <script src="js/layer.js">script>head><body class="layui-layout-body"><div class="layui-layout layui-layout-admin">    <div class="layui-header">        <div class="layui-logo" style="font-weight: bold;font-size: 19px">学生成绩管理系统div>        <ul class="layui-nav layui-layout-left">ul>        <c:if test="${loginUser==null}">            <ul class="layui-nav layui-layout-right">                <li class="layui-nav-item"><a href="login.jsp">请登录a>li>            ul>        c:if>        <c:if test="${loginUser!=null}">            <ul class="layui-nav layui-layout-right">                <li class="layui-nav-item"><a>${loginUser.username}a>li>                <li class="layui-nav-item"><a href="AuthServlet?action=logout">退出登录a>li>            ul>
            <input type="text" name="scoreName" lay-verify="required" class="layui-input">        div>    div>    <div class="layui-form-item">        <label class="layui-form-label">性别:label>        <div class="layui-input-block">            <input name="scoreSex" type="radio" value=
            
                     
             
               

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/124440.html

相关文章

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

    摘要:基于的学生宿舍管理系统部分代码实现楼栋不能为空编辑表单提交之前进行检查,如果,则不允许提交根据获取值姓名不能为空电话不能为空侧边栏 基于javaweb+jsp的学生...

    DandJ 评论0 收藏0
  • JavaWeb学生选课(Servlet、JSP、JDBC)

    摘要:运行结果数据库的个表表表一定要导入数据库用的包,以及在在文件夹中导入数据库包文件目录结构具体代码首页欢迎进入选课系统欢迎进入选课系统学生登录学生注册管理员登录学生登录学生登录学生登录学号密码登录注册返回学生注册注册 运行结果: showImg(https://segmentfault.com/img/bVbthFj); showImg(https://segmentfault.com/...

    zhunjiee 评论0 收藏0
  • JavaWeb学生选课(Servlet、JSP、JDBC)

    摘要:运行结果数据库的个表表表一定要导入数据库用的包,以及在在文件夹中导入数据库包文件目录结构具体代码首页欢迎进入选课系统欢迎进入选课系统学生登录学生注册管理员登录学生登录学生登录学生登录学号密码登录注册返回学生注册注册 运行结果: showImg(https://segmentfault.com/img/bVbthFj); showImg(https://segmentfault.com/...

    fuchenxuan 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<