期末测试javaweb 考勤系统前端
Posted 你的撒凋零呦
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了期末测试javaweb 考勤系统前端相关的知识,希望对你有一定的参考价值。
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">员工信息录入</h1> <a href="chenggong.jsp">返回主页</a> <form action="servlet1?method=add" method="post" onsubmit="return check()"> <div class="a"> 工号<input type="text" id="id" name="id"/> </div> <div class="a"> 密码<input type="text" id="pwd" name="pwd"/> </div> <div class="a"> 生日<input type="text" id="birthday" name="birthday"/> </div> <div class="a"> 姓名<input type="text" id="name" name="name" /> </div> <div class="a"> 性别<input type="text" id="sex" name="sex" /> </div> <div class="a"> 部门<input type="text" id="department" name="department" /> </div> <div class="a"> 角色<input type="text" id="role" name="role" /> </div> <div class="a"> <button type="submit" class="b">保 存</button> </div> </form> </div> <script type="text/javascript"> function check() { var number = document.getElementById("birthday"); var name = document.getElementById("name"); var sex = document.getElementById("sex"); var clas = document.getElementById("department"); var id = document.getElementById("id"); var pwd = document.getElementById("pwd"); var dengji = document.getElementById("role"); //非空 if(number.value == ‘‘) { alert(‘工号为空‘); number.focus(); return false; } if(name.value == ‘‘) { alert(‘姓名为空‘); name.focus(); return false; }if(sex.value == ‘‘) { alert(‘性别为空‘); sex.focus(); return false; } if(clas.value == ‘‘) { alert(‘班级为空‘); clas.focus(); return false; } if(id.value == ‘‘) { alert(‘id为空‘); id.focus(); return false; } if(pwd.value == ‘‘) { alert(‘密码为空‘); pwd.focus(); return false; } if(dengji.value == ‘‘) { alert(‘等级为空‘); dengji.focus(); return false; } } </script> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">添加部门信息</h1> <a href="chenggong.jsp">返回主页</a> <form action="CourseServlet?method=adds" method="post" onsubmit="return check()"> <div class="a"> 部门编码<input type="text" id="departmentid" name="departmentid"/> </div> <div class="a"> 部门名称<input type="text" id="department" name="department"/> </div> <div class="a"> <button type="submit" class="b">保 存</button> </div> </form> </div> <script type="text/javascript"> function check() { var departmentid = document.getElementById("departmentid"); var department = document.getElementById("department"); //非空 if(departmentid.value == ‘‘) { alert(‘部门编码为空‘); departmentid.focus(); return false; } if(department.value == ‘‘) { alert(‘部门名称为空‘); department.focus(); return false; } } </script> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>管理员功能页</title> </head> <body> <div align="center"> <div class="a"> <a href="adds.jsp">添加部门基本信息</a> </div> <div class="a"> <a href="CourseServlet?method=list">修改部门基本信息</a> </div> <div class="a"> <a href="del.jsp">删除部门基本信息</a> </div> <div class="a"> <a href="add.jsp">添加员工基本信息</a> </div> <div class="a"> <a href="servlet1?method=lists">修改员工基本信息</a> </div> <div class="a"> <a href="dels.jsp">删除员工基本信息</a> </div> <div class="a"> <a href="servlet1?method=lists">设置角色管理</a> </div> <div class="a"> <a href="servlet1?method=lists">密码重置</a> </div> <div class="a"> <a href="houtai.jsp">退出登录</a> </div> </div> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">信息录入</h1> <a href="teacher.jsp">返回主页</a> <form action="CourseServlet?method=add" method="post" onsubmit="return check()"> <div class="a"> 课程号<input type="text" id="number" name="number"/> </div> <div class="a"> 课程名<input type="text" id="name" name="name"/> </div> <div class="a"> 班级<input type="text" id="clas" name="clas"/> </div> <div class="a"> <button type="submit" class="b">保 存</button> </div> </form> </div> <script type="text/javascript"> function check() { var number = document.getElementById("number"); var clas = document.getElementById("clas"); var name = document.getElementById("name"); //非空 if(number.value == ‘‘) { alert(‘课程号为空‘); number.focus(); return false; } if(name.value == ‘‘) { alert(‘课程名为空‘); name.focus(); return false; }if(clas.value == ‘‘) { alert(‘地点为空‘); clas.focus(); return false; } } </script> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">部门信息删除</h1> <a href="chenggong.jsp">返回主页</a> <form action="CourseServlet?method=getcoursebyname" method="post" onsubmit="return check()"> <div class="a"> 部门编码<input type="text" id="departmentid" name="departmentid"/> </div> <div class="a"> <button type="submit" class="b">查 找</button> </div> </form> </div> <script type="text/javascript"> function check() { var name = document.getElementById("departmentid");; //非空 if(name.value == ‘‘) { alert(‘部门名为空‘); biaoti.focus(); return false; } } </script> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">员工信息删除</h1> <a href="chenggong.jsp">返回主页</a> <form action="servlet1?method=getcoursebyname" method="post" onsubmit="return check()"> <div class="a"> 姓名<input type="text" id="name" name="name"/> </div> <div class="a"> <button type="submit" class="b">查 找</button> </div> </form> </div> <script type="text/javascript"> function check() { var name = document.getElementById("name");; //非空 if(name.value == ‘‘) { alert(‘姓名为空‘); biaoti.focus(); return false; } } </script> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> <style> .a{ margin-top: 20px; } .b{ font-size: 20px; width: 160px; color: white; background-color: greenyellow; } .tb, td { border: 1px solid black; font-size: 22px; } </style> </head> <body> <div align="center"> <h1 style="color: black;">部门信息删除</h1> <a href="chenggong.jsp">返回主页</a> <table class="tb"> <tr> <td>部门编码</td> <td>${course.departmentid}</td> </tr> <tr> <td>部门名</td> <td>${course.department}</td> </tr> </table> <div class="a"> <a onclick="return check()" href="CourseServlet?method=del&id=${course.departmentid}">删 除</a> </div> </div> <script type="text/javascript"> function check() { if (confirm("真的要删除吗?")){ return true; }else{ return false; } } </script> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">部门信息修改</h1> <a href="chenggong.jsp">返回主页</a> <form action="CourseServlet?method=update" method="post" onsubmit="return check()"> <div class="a"> 部门编码<input type="text" id="departmentid" name="departmentid" value="${course.departmentid}"/> </div> <div class="a"> 部门名<input type="text" id="department" name="department" value="${course.department}"/> </div> <div class="a"> <button type="submit" class="b">修 改</button> </div> </form> </div> <script type="text/javascript"> function check() { var number = document.getElementById("departmentid");; var name = document.getElementById("department"); //非空 if(number.value == ‘‘) { alert(‘部门代码为空‘); number.focus(); return false; } if(name.value == ‘‘) { alert(‘部门名为空‘); name.focus(); return false; } } </script> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">员工信息修改</h1> <a href="chenggong.jsp">返回主页</a> <form action="servlet1?method=update" method="post" onsubmit="return check()"> <div class="a"> id<input type="text" id="id" name="id" value="${course.id}"/> </div> <div class="a"> 密码<input type="text" id="pwd" name="pwd" value="${course.pwd}"/> </div> <div class="a"> 角色<input type="text" id="role" name="role" value="${course.dengji}"/> </div> <div class="a"> 姓名<input type="text" id="name" name="name" value="${course.name}"/> </div> <div class="a"> 生日<input type="text" id="birthday" name="birthday" value="${course.number}"/> </div> <div class="a"> 性别<input type="text" id="sex" name="sex" value="${course.sex}"/> </div> <div class="a"> 部门<input type="text" id="department" name="department" value="${course.clas}"/> </div> <div class="a"> <button type="submit" class="b">修 改</button> </div> </form> </div> <script type="text/javascript"> function check() { var id = document.getElementById("id");; var pwd = document.getElementById("pwd"); var role = document.getElementById("role"); var name = document.getElementById("name"); var birthday = document.getElementById("birthday");; var sex = document.getElementById("sex"); var department = document.getElementById("department");; //非空 if(id.value == ‘‘) { alert(‘id为空‘); id.focus(); return false; } if(pwd.value == ‘‘) { alert(‘密码为空‘); pwd.focus(); return false; } if(role.value == ‘‘) { alert(‘角色为空‘); role.focus(); return false; } if(name.value == ‘‘) { alert(‘姓名为空‘); name.focus(); return false; } if(birthday.value == ‘‘) { alert(‘生日为空‘); birthday.focus(); return false; } if(sex.value == ‘‘) { alert(‘性别为空‘); sex.focus(); return false; } if(department.value == ‘‘) { alert(‘部门为空‘); department.focus(); return false; } } </script> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> <style> .a{ margin-top: 20px; } .b{ font-size: 20px; width: 160px; color: white; background-color: greenyellow; } .tb, td { border: 1px solid black; font-size: 22px; } </style> </head> <body> <div align="center"> <h1 style="color: black;">员工信息删除</h1> <a href="chenggong.jsp">返回主页</a> <table class="tb"> <tr> <td>id</td> <td>${course.id}</td> </tr> <tr> <td>密码</td> <td>${course.pwd}</td> </tr> <tr> <td>角色</td> <td>${course.dengji}</td> </tr> <tr> <td>姓名</td> <td>${course.name}</td> </tr> <tr> <td>生日</td> <td>${course.number}</td> </tr> <tr> <td>性别</td> <td>${course.sex}</td> </tr> <tr> <td>部门</td> <td>${course.clas}</td> </tr> </table> <div class="a"> <a onclick="return check()" href="servlet1?method=del&id=${course.id}">删 除</a> </div> </div> <script type="text/javascript"> function check() { if (confirm("真的要删除吗?")){ return true; }else{ return false; } } </script> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">信息修改</h1> <a href="student.jsp">返回上一页</a> <form action="upservlet" method="post" onsubmit="return check_submit()"> <div class="a"> id<input type="text" id="id" name="id"/> </div> <div class="a"> 密码<input type="text" id="pwd" name="pwd"/> </div> <div class="a"> 工号<input type="text" id="number" name="number"/> </div> <div class="a"> 姓名<input type="text" id="name" name="name" /> </div> <div class="a"> 性别<input type="text" id="sex" name="sex" /> </div> <div class="a"> 班级<input type="text" id="clas" name="clas" /> </div> <div class="a"> 权限<input type="text" id="dengji" name="dengji" /> </div> <div class="a"> <button type="submit" class="b">保 存</button> </div> </form> </div> <script type="text/javascript"> function check() { var number = document.getElementById("number"); var name = document.getElementById("name"); var sex = document.getElementById("sex"); var clas = document.getElementById("clas"); var id = document.getElementById("id"); var pwd = document.getElementById("pwd"); var dengji = document.getElementById("dengji"); //非空 if(number.value == ‘‘) { alert(‘工号为空‘); number.focus(); return false; } if(name.value == ‘‘) { alert(‘姓名为空‘); name.focus(); return false; }if(sex.value == ‘‘) { alert(‘性别为空‘); sex.focus(); return false; } if(clas.value == ‘‘) { alert(‘班级为空‘); clas.focus(); return false; } if(id.value == ‘‘) { alert(‘id为空‘); id.focus(); return false; } if(pwd.value == ‘‘) { alert(‘密码为空‘); pwd.focus(); return false; } if(dengji.value == ‘‘) { alert(‘等级为空‘); dengji.focus(); return false; } } </script> </body> </html> <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Insert title here</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h6 style="color: black;">登陆界面</h6> <form name = "form1" action=AddServlet method="post" onsubmit="return check_submit()"> <table> <tr> <td>登陆账号</td> <td colspan="2"> <input type="text" id="id" name="id" maxlength="12" onblur="blur_id()" onfocus="focus_id()"/></td> <td width="300"><div id="result"></td> </tr> <tr> <td>登陆密码</td> <td colspan="2"> <input type="password" id="password" name="password" onblur="blur_pass()" onfocus="focus_pass()" /></td> <td width="300"><div id="result1"></td> </tr> <tr><td>验证码</td> <td> <input type="text" value="" placeholder="请输入验证码(区分大小写)" style="height:20px;position: relative; font-size:16px;"id ="text"> <canvas id="canvas" width="110" height="30" onclick="dj()" style="border: 1px solid #ccc; border-radius: 5px;"></canvas> <button type=submit class="btn" onclick="sublim()">提交</button> </td> </tr> </table> </form> </div> <script type="text/javascript"> /* 表单验证 */ var flag = true; // flag 如果为true(即用户名合法)就允许表单提交, 如果为false(即用户名不合法)阻止提交 /*function focus_pass() { var nameObj = document.getElementById("result1"); nameObj.innerHTML = "由六位字符和数字组成"; nameObj.style.color="#999"; } function blur_pass() { var nameObj = document.getElementById("result1"); // 判断用户名是否合法 var str2 = check_user_pass(document.form1.password.value); nameObj.style.color="red"; if ("密码合法" == str2) { flag = true; nameObj.innerHTML = str2; } else { nameObj.innerHTML = str2; } } function check_user_pass(str) { var str2 = "密码合法"; if ("" == str) { str2 = "密码为空"; return str2; } else if (str.length!=6) { str2 = "用户名应是六位组成"; return str2; } else if (!check_word(str)) { str2 = "未含有英文字符"; return str2; } return str2; } function focus_id() { var nameObj = document.getElementById("result"); nameObj.innerHTML = "由六到十二英文字符和数字组成"; nameObj.style.color="#999"; } function blur_id() { var nameObj = document.getElementById("result"); // 判断用户名是否合法 var str2 = check_user_id(document.form1.id.value); nameObj.style.color="red"; if ("用户名合法" == str2) { flag = true; nameObj.innerHTML = str2; } else { nameObj.innerHTML = str2; } } function check_user_id(str) { var str2 = "用户名合法"; if ("" == str) { str2 = "用户名号为空"; return str2; } else if ((str.length<=4)||(str.length>=12)) { str2 = "用户名应是六到十二位组成"; return str2; } else if (!check_word(str)) { str2 = "未含有英文字符"; return str2; } else if(!check_firstword(str)) { str2 = "必须以英文字母开头"; return str2; } return str2; } function check_firstword(str) { var arr = ["a", "b", "c", "d", "e", "f", "g", "h","i","j", "k", "l", "m", "n", "o", "p", "q","r", "s", "t", "u", "v", "w", "x", "y","z","A", "B", "C", "D", "E", "F", "G", "H","I","J", "K", "L", "M", "N", "O", "P", "Q","R","S", "T", "U", "V", "W", "X", "Y", "Z"]; for (var i = 0; i < arr.length; i++) { if (arr[i] == str.charAt(0)) { return true; } } return false; } function check_word(str) { var arr = ["a", "b", "c", "d", "e", "f", "g", "h","i","j", "k", "l", "m", "n", "o", "p", "q","r", "s", "t", "u", "v", "w", "x", "y","z","A", "B", "C", "D", "E", "F", "G", "H","I","J", "K", "L", "M", "N", "O", "P", "Q","R","S", "T", "U", "V", "W", "X", "Y", "Z"]; for (var i = 0; i < arr.length; i++) { for (var j = 0; j < str.length; j++) { if (arr[i] == str.charAt(j)) { return true; } } } return false; } // 验证用户名是否含有特殊字符 function check_other_char(str) { var arr = ["&", "\", "/", "*", ">", "<", "@", "!"]; for (var i = 0; i < arr.length; i++) { for (var j = 0; j < str.length; j++) { if (arr[i] == str.charAt(j)) { return true; } } } return false; }*/ // 根据验证结果确认是否提交 function check_submit() { if (flag == false) { return false; } return true; } </script> </head> </body> <script> var show_num = []; draw(show_num); function dj(){ draw(show_num); } function sublim(){ var val=document.getElementById("text").value; var num = show_num.join(""); if(val==‘‘){ alert(‘请输入验证码!‘); }else if(val == num){ alert(‘提交成功!‘); document.getElementById(".input-val").val(‘‘); draw(show_num); }else{ alert(‘验证码错误! 你输入的是: ‘+val+" 正确的是: "+num+‘ 请重新输入!‘); document.getElementById("text").value=‘‘; draw(show_num); } } function draw(show_num) { var canvas_width=document.getElementById(‘canvas‘).clientWidth; var canvas_height=document.getElementById(‘canvas‘).clientHeight; var canvas = document.getElementById("canvas");//获取到canvas的对象,演员 var context = canvas.getContext("2d");//获取到canvas画图的环境,演员表演的舞台 canvas.width = canvas_width; canvas.height = canvas_height; var sCode = "1,2,3,4,5,6,7,8,9,0,q,w,e,r,t,y,u,i,o,p,a,s,d,f,g,h,j,k,l,z,x,c,v,b,n,m"; var aCode = sCode.split(","); var aLength = aCode.length;//获取到数组的长度 for (var i = 0; i <= 3; i++) { var j = Math.floor(Math.random() * aLength);//获取到随机的索引值 var deg = Math.random() * 30 * Math.PI / 180;//产生0~30 var txt = aCode[j];//得到随机的一个内容 show_num[i] = txt; var x = 10 + i * 20;//文字在canvas上的x坐标 var y = 20 + Math.random() * 8;//文字在canvas上的y坐标 context.font = "bold 23px 微软雅黑"; context.translate(x, y); context.rotate(deg); context.fillStyle = randomColor(); context.fillText(txt, 0, 0); context.rotate(-deg); context.translate(-x, -y); } for (var i = 0; i <= 5; i++) { //验证码上显示线条 context.strokeStyle = randomColor(); context.beginPath(); context.moveTo(Math.random() * canvas_width, Math.random() * canvas_height); context.lineTo(Math.random() * canvas_width, Math.random() * canvas_height); context.stroke(); } for (var i = 0; i <= 30; i++) { //验证码上显示小点 context.strokeStyle = randomColor(); context.beginPath(); var x = Math.random() * canvas_width; var y = Math.random() * canvas_height; context.moveTo(x, y); context.lineTo(x + 1, y + 1); context.stroke(); } } function randomColor() {//得到随机的颜色值 var r = Math.floor(Math.random() * 256); var g = Math.floor(Math.random() * 256); var b = Math.floor(Math.random() * 256); return "rgb(" + r + "," + g + "," + b + ")"; } </script> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>公文系统</title> </head> <body> <div align="center"> <div class="a"> <a href="add.jsp">教师信息登记</a> </div> <div class="a"> <a href="CourseServlet?method=list">教师信息修改</a> </div> <div class="a"> <a href="del.jsp">教师信息删除</a> </div> <div class="a"> <a href="search.jsp">教师信息查询</a> </div> </div> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">部门信息列表</h1> <a href="chenggong.jsp">返回主页</a> <table class="tb"> <tr> <td>部门名</td> <td>部门编码</td> <td align="center" colspan="2">操作</td> </tr> <c:forEach items="${courses}" var="item"> <tr> <td>${item.departmentid}</td> <td>${item.department}</td> <td><a href="CourseServlet?method=getcoursebyid&id=${item.departmentid}">修改</a></td> </tr> </c:forEach> </table> </div> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <% Object message = request.getAttribute("message"); if(message!=null && !"".equals(message)){ %> <script type="text/javascript"> alert("<%=request.getAttribute("message")%>"); </script> <%} %> <div align="center"> <h1 style="color: black;">部门信息列表</h1> <a href="chenggong.jsp">返回主页</a> <table class="tb"> <tr> <td>id</td> <td>密码</td> <td>角色</td> <td>姓名</td> <td>生日</td> <td>性别</td> <td>部门</td> <td align="center" colspan="2">操作</td> </tr> <c:forEach items="${courses}" var="item"> <tr> <td>${item.id}</td> <td>${item.pwd}</td> <td>${item.role}</td> <td>${item.name}</td> <td>${item.birthday}</td> <td>${item.sex}</td> <td>${item.department}</td> <td><a href="servlet1?method=getcoursebyid&id=${item.id}">修改</a></td> </tr> </c:forEach> </table> </div> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <div align="center"> <h1 style="color: black;">课程信息查询</h1> <form action="servlet1?method=search" method="post" onsubmit="return check()"> <div class="a"> id<input type="text" id="id" name="id" /> </div> <div class="a"> 密码<input type="text" id="pwd" name="pwd" /> </div> <div class="a"> 权限<input type="text" id="role" name="role" /> </div> <div class="a"> 姓名<input type="text" id="name" name="name" /> </div> <div class="a"> 生日<input type="text" id="birthday" name="birthday" /> </div> <div class="a"> 性别<input type="text" id="sex" name="sex" /> </div> <div class="a"> 部门<input type="text" id="department" name="department" /> </div> <div class="a"> id<input type="text" id="id" name="id" /> </div> <div class="a"> <button type="submit" class="b">查 询</button> </div> </form> </div> <script type="text/javascript"> } </script> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <div align="center"> <h1 style="color: black;">信息列表</h1> <table class="tb"> <tr> <td>id</td> <td>密码</td> <td>权限</td> <td>姓名</td> <td>生日</td> <td>性别</td> <td>部门</td> </tr> <!-- forEach遍历出adminBeans --> <c:forEach items="${courses}" var="item" varStatus="status"> <tr> <td>${item.id}</td> <td>${item.pwd}</td> <td>${item.role}</td> <td>${item.name}</td> <td>${item.birthday}</td> <td>${item.sex}</td> <td>${item.department}</td> </tr> </c:forEach> </table> </div> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>考勤系统-经理端</title> </head> <body> <div align="center"> <div class="a"> <a href="search.jsp">查看个人信息</a> </div> <div class="a"> <a href="CourseServlet?method=list">修改个人信息</a> </div> <div class="a"> <a href="CourseServlet?method=list">修改个人密码</a> </div> <div class="a"> <a href="search.jsp">日常考勤</a> </div> <div class="a"> <a href="search.jsp">浏览个人考勤记录</a> </div> <div class="a"> <a href="houtai.jsp">退出登录</a> </div> </div> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>考勤系统-员工端</title> </head> <body> <div align="center"> <div class="a"> <a href="search.jsp">查看个人信息</a> </div> <div class="a"> <a href="CourseServlet?method=list">修改个人信息</a> </div> <div class="a"> <a href="CourseServlet?method=list">修改个人密码</a> </div> <div class="a"> <a href="search.jsp">日常考勤</a> </div> <div class="a"> <a href="search.jsp">浏览个人考勤记录</a> </div> <div class="a"> <a href="houtai.jsp">退出登录</a> </div> </div> </body> </html>
以上是关于期末测试javaweb 考勤系统前端的主要内容,如果未能解决你的问题,请参考以下文章
《java精品毕设》基于javaweb宠物领养平台管理系统(源码+毕设论文+sql):主要实现:个人中心,信息修改,填写领养信息,交流论坛,新闻,寄养信息,公告,宠物领养信息,我的寄养信息等(代码片段