2020.12.08
一、今日学习内容
今天自己完成了一些代码
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>首页</title> </head> <body> <p>选课系统</p> <div align="center"> <div class="a"> <a href="teacher.jsp">教师</a> </div> <div class="a"> <a href="student.jsp">学生</a> </div> <div class="a"> <a href="manager.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> <% 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="index.jsp">返回主页</a> <div class="a"> <a href="mateaadd.jsp">添加教师信息</a> </div> <div class="a"> <a href="mastuadd.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> <% 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="index.jsp">返回主页</a> <div class="a"> <a href="Courseadd.jsp">添加课程</a> </div> <div class="a"> <a href="teacherxiugai.jsp">修改个人信息</a> </div> <div class="a"> <a href="teacherliulan.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> <% 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="index.jsp">返回主页</a> <div class="a"> <a href="studentxiugai.jsp">修改个人信息</a> </div> <div class="a"> <a href="liulancourse.jsp">浏览课程信息</a> </div> <div class="a"> <a href="xuanke.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="manager.jsp">返回管理员页面</a> <div class="content"> <div class="main"> <form name="form" action="ManagerServelet?method=studentadd" method="post" > <table> <tr> <td>学号</td> <td><input type="text" id="IDstudent" name="IDstudent" placeholder="八位数字组成" /></td> </tr> <tr> <td>学生姓名</td> <td><input type="text" id="studentname" name="studentname"/></td> </tr> <tr> <td>学生性别</td> <td> <input type="radio"name="studentsex"value="男"checked>男 <input type="radio"name="studentsex"value="女">女 </td> </tr> <tr> <td>所在班级</td> <td><input type="text" id="studentclass" name="studentclass"/></td> </tr> <tr> <td>所属专业组成</td> <td><input type="text" id="studentzhuanye" name="studentzhuanye"/></td> </td> </tr> <tr> <td><button type="submit" class="b">提 交<tton></td> </tr> </table> </form> <script type="text/javascript"></script> </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="manager.jsp">返回管理员页面</a> <div class="content"> <div class="main"> <form name="form" action="ManagerServelet?method=teacheradd" method="post" > <table> <tr> <td>教师工号</td> <td><input type="text" id="IDteacher" name="IDteacher" placeholder="八位数字组成" /></td> </tr> <tr> <td>教师姓名</td> <td><input type="text" id="teachername" name="teachername"/></td> </tr> <tr> <td>教师性别</td> <td> <input type="radio"name="teachersex"value="男"checked>男 <input type="radio"name="teachersex"value="女">女 </td> </tr> <tr> <td>教师所在学院</td> <td><input type="text" id="teacherxueyuan" name="teacherxueyuan"/></td> </tr> <tr> <td>教师职称:</td> <td> <input type="radio"name="teacherzhicheng"value="教授"checked>教授 <input type="radio"name="teacherzhicheng"value="副教授">副教授 <input type="radio"name="teacherzhicheng"value="讲师">讲师 <input type="radio"name="teacherzhicheng"value="助教">助教 </td> </tr> <tr> <td><button type="submit" class="b">提 交<tton></td> </tr> </table> </form> <script type="text/javascript"></script> </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> <div class="content"> <div class="main"> <form name="form" action="TeacherServelet?method=course1add" method="post" > <table> <tr> <td>课程编号</td> <td><input type="text" id="IDcourse1" name="IDcourse1" placeholder="六位数字组成" /></td> </tr> <tr> <td>课程名称</td> <td><input type="text" id="course1name" name="course1name"/></td> </tr> <tr> <td>选课人数</td> <td><input type="text" id="course1number" name="course1number"/></td> </tr> <tr> <td><button type="submit" class="b">提 交<tton></td> </tr> </table> </form> <script type="text/javascript"></script> </div> </div> </body> </html>
二、遇到的问题
一些具体的功能还是没有实现
三、明日计划
明天继续练习