📄 saccountscore.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="../Err.jsp" %>
<%@include file="../notLoginTuiChu.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<link rel="stylesheet" href="../menu/css/ioa.css" type="text/css">
<jsp:useBean id="AccountScore" class="javaBeanClass.AccountScoreBean" scope="page"/>
<jsp:setProperty name="AccountScore" property="*"/>
<%
int quesNum=Integer.parseInt(request.getParameter("quesNum"));
StringBuffer stuAnswer=new StringBuffer();
String answer=null;
//提取考生答案
for(int i=1;i<=quesNum;i++){
answer=request.getParameter("q"+i);
//System.out.println(answer);
if(answer==null){
stuAnswer.append("Z");
}
else{
stuAnswer.append(answer);
}
}
int score=0;
AccountScore.setStuAnswers(stuAnswer.toString());
score=AccountScore.accountScore();
%>
<html>
<head>
<link rel="stylesheet" href="../menu/css/ioa.css" type="text/css">
<title>成绩计算</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
function keyDown(){
if ((window.event.altKey)&&((window.event.keyCode==37)||(window.event.keyCode==39)))
{
window.event.returnValue=false;
}
if ((window.event.keyCode==8) ||(window.event.keyCode==116)||(window.event.ctrlKey && window.event.keyCode==82))
{//Ctrl + R
window.event.keyCode=0;
window.event.returnValue=false;
}
if ((window.event.ctrlKey)&&(window.event.keyCode==78)) //屏蔽 Ctrl+n
window.event.returnValue=false;
if ((window.event.shiftKey)&&(window.event.keyCode==121)) //屏蔽 shift+F10
window.event.returnValue=false;
if (window.event.srcElement.tagName == "A" && window.event.shiftKey)
window.event.returnValue = false; //屏蔽 shift 加鼠标左键新开一网页
if ((window.event.altKey)&&(window.event.keyCode==115))
{ //屏蔽Alt+F4
window.showModelessDialog("about:blank","","dialogWidth:1px;dialogheight:1px");
return false;
}
}
function nocontextmenu()
{
window.event.cancelBubble = true
window.event.returnValue = false;
return false;
}
document.onkeydown=keyDown;
document.oncontextmenu = nocontextmenu;
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div align="center">
交卷成功!你的最后成绩是<%=score%>分
</div><br>
<div align="center"><a href="javascript:window.close('TestMain');">返回首页</a></div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -