⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 markshow.jsp

📁 使用JSP、Servlet以及JavaBean来实现学生成绩查询系统,简单好用
💻 JSP
字号:
<%@ page language="java" import="mypack.*" pageEncoding="GB2312"%>
<%@ page import="mypack.Student" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<jsp:useBean id="student" type="mypack.Student" scope="session"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>学生成绩查询系统</title>
  </head>
  
  <body>
<fieldset>
<legend align=center>学生成绩查询系统</legend>
<table border=1 width=70% align=center>
<tr align=center>
  <td><font color=#0000FF>学号</font></td>
  <td><font color=#0000FF>姓名</font></td>
  <td><font color=#0000FF>性别</font></td>
</tr>
<tr align=center>
  <td><%=student.getID()%></td>
  <td><%=student.getName()%></td>
  <td><%=student.getGender()%></td>
</tr>
</table>
<br>
<table border=1 width=70% align =center>
<tr align=center>
  <td width = 40% ><font color=#FF0000>课程名称</font></td>
  <td width = 20% ><font color=#FF0000>课程类别</font></td>
  <td width = 10% ><font color=#FF0000>学时</font></td>
  <td width = 10% ><font color=#FF0000>学分</font></td>
  <td width = 10% ><font color=#FF0000>成绩</font></td>
  <td width = 10% ><font color=#FF0000>性质</font></td>
</tr>
<%for(int i = 0; i < student.getCourses().size(); i++){
      Course course = (Course)(student.getCourses().get(i));%>
<tr align=center>
  <td width = 40% ><%=course.getName()%></td>
  <td width = 20% ><%=course.getType()%></td>
  <td width = 10% ><%=course.getPeriod()%></td>
  <td width = 10% ><%=course.getCredit()%></td>
  <td width = 10% ><%=course.getMark()%></td>
  <td width = 10% ><%=course.getKind()%></td>
</tr>
<%}%>
</table>
</fieldset>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -