📄 check.jsp
字号:
<%@ page contentType="text/html; charset=GBK" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>核对身份</title>
<script language="javascript1.1">
function omiga_window(){
newwindow=window.open("exam.jsp?sid=${param.sid}&nm=${param.nm}","",
"fullscreen=yes,menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=yes,status=no");
newwindow.moveTo(0,0);
//newwindow.resizeTo(screen.width, screen.height-30);
window.opener=null;
window.close();
}
</script>
</head>
<body>
<br/><br/><br/>
<h2 align="center">核对身份</h2>
<table width="369" border="0" align="center" cellpadding=4 cellspacing=1 bgcolor=#333333>
<tr bgcolor=#ffffff>
<td width="105" align="center">学 号</td>
<td width="238">${param.sid}</td>
</tr>
<tr bgcolor=#ffffff>
<td align="center">姓 名</td>
<td>${param.nm}</td>
</tr>
<tr bgcolor=#ffffff>
<td colspan="2" align="center" >等待试卷...</td>
</tr>
</table>
<script type="text/javascript">
var xmlHttp;
var k = 1;
function createXMLHttpRequest() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
}
function startRequest() {
createXMLHttpRequest();
xmlHttp.onreadystatechange = handleStateChange;
xmlHttp.open("GET", "q.jsp?sid=${param.sid}&temp=" + k, true);
xmlHttp.send(null);
k++;
}
function handleStateChange() {
if(xmlHttp.readyState == 4) {
if(xmlHttp.status == 200) {
var status = xmlHttp.responseText;
if (status.search("exam")!= -1) {
window.clearInterval(t);
omiga_window();
} else if (status.search("removed")!= -1) {
alert("考试资格被取消");
window.opener=null;
window.close();
}
}
}
}
var t = window.setInterval(startRequest, 5000);
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -