📄 checkscore1.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="java.sql.*" %>
<%@ page import="DataBaseConnection.OracleConnection" %>
<html>
<body bgcolor=cyan>
<center>
<font size=7>
<%
String HM =request.getParameter("hm");
String BH =request.getParameter("bh");
String MM =request.getParameter("mm");
String message="";
boolean check=true;
if( HM==null||HM.trim().equals( "" ) ){ out.print("输入信息不能为空!请返回!");}
else{
Connection conn = null;
Statement stmt = null;
String user = "sox";
String password = "123";
OracleConnection oc = new OracleConnection( user, password );
try{
conn = oc.getConnection();
stmt = conn.createStatement();
}
catch( SQLException e ){ System.out.println( e.getMessage()+"374" ); }
String sql="select student.编号,score.语文,score.数学,score.英语,score.综合,score.X科,score.总分,student.姓名 from student,score where student.编号=score.号码 and student.录取院校='"+BH+"' and student.编号='"+HM+"'";
ResultSet rs = stmt.executeQuery(sql);
try {rs.next();
String a=rs.getString(1);
}
catch(Exception e){check=false;out.print("我校没有录取该考生!请返回!"); }
if(check){
%><br> <font size=+3><%=HM%>号考生成绩</font>
<table border="1">
<tr bgcolor="#FFCC99">
<th nowrap>姓名</th>
<th nowrap>语文</th>
<th nowrap>数学</th>
<th nowrap>英语</th>
<th nowrap>综合</th>
<th nowrap>X科</th>
<th nowrap>总分</th>
</tr>
<%
out.print(
"<tr> <td>"+rs.getString(8)+"</td><td>"+rs.getString(2)+"</td><td>"+rs.getString(3)+"</td><td>"+rs.getString(4)+
"</td><td>"+rs.getString(5)+"</td><td>"+rs.getString(6)+"</td><td>"+rs.getString(7)+"</td></tr>"
);
}
}
%></table>
<form action="College.jsp" method="post">
<br><input type="hidden" name="DH" value="<%=BH%>">
<input type="hidden" name="MM" value="<%=MM%>">
<input type="submit" value="返回">
</form>
</font>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -