📄 exam.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META HTTP-EQUIV="PRAGMA" CONTENT="CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="TUE,04 Dec 2096 21:29:02 GMT">
<title>蓝雨聊天室(有奖考试)</title>
<style type="text/css">
<!--
td, p, input, font, select, option, textarea, form { font-family:"宋体"; font-size: 12px }
a:link { text-decoration: none }
a:visited { text-decoration: none; color:#0000ff}
a:hover { text-decoration: underline }
a:active { text-decoration: none;}
.p9 {font-size: 9pt; line-height: 14pt }
-->
</style>
</head>
<script language="javascript">
var appletmark="";
function trim(string) {
var tmpchar, i, j, result;
i = 0;
tmpchar = string.charAt(i);
while (tmpchar == ' ') {
i ++;
tmpchar = string.charAt(i);
}
j = string.length - 1;
tmpchar = string.charAt(j);
while (tmpchar == ' ') {
j --;
tmpchar = string.charAt (j);
}
if ( i <= j)
result = string.substring(i,j+1);
else
result = "";
return result;
}
function submit_form()
{
var utype=opener.document.ChatClient.getExamUserType();
if(opener==null)
return false;
else if(utype==1)
{
alert("你不是考官,不能出题。");
return false;
}
else if(utype==2)
{
alert("不能在自建房间里出考题。");
return false;
}
var ititle=trim(document.form1.examtitle.value);
var a1=trim(document.form1.answer1.value);
var a2=trim(document.form1.answer2.value);
var a3=trim(document.form1.answer3.value);
var a4=trim(document.form1.answer4.value);
var okanwser=document.form1.okanwser.value;
if(ititle.length<4)
alert("请输入题目!不能少于4个字。");
else if(a1.length==0)
alert("请输入答案A!");
else if(a2.length==0 )
alert("请输入答案B!");
else if(a3.length==0 )
alert("请输入答案C!");
else if(a4.length==0 )
alert("请输入答案D!");
else if(a1==a2||a1==a3||a1==a4||a2==a3||a2==a4||a3==a4)
alert("不能有相同的答案选项。");
else if(okanwser=="")
alert("请先选择好你的正确答案。");
else
{
if(confirm("你确定你填写的考试题无错,并要提交它吗?"))
{
var ival=ititle+"\n"+a1+"\n"+a2+"\n"+a3+"\n"+a4+"\n"+okanwser
opener.document.ChatClient.addNewExam(ival);
window.close();
}
}
return false;
}
</script>
<body bgcolor="#C0C0C0" topmargin="5" leftmargin="5" oncontextmenu="self.event.returnValue=false">
<form name="form1" onsubmit="return submit_form();">
<table border="0" width="100%" cellspacing="4" cellpadding="4" bgcolor="#B4B4B4" height="100%">
<tr>
<td width="95%" ><b>有奖考试系统(考官出题)</b> <a href="examlist.htm">考题列表</a></td>
<td width="5%" ><input type="button" value="关 闭" onclick="window.close()"></td>
</tr>
<tr>
<td width="100%" bgcolor="#E2E2E4" colspan="2" height="95%" valign="top">
<br> <font color="#ff0000">请考官认真填写考题! 请不要乱出一些重复、没有意义、黄色、反动的题目,否则一经发现一律撤职并减分。</font><br></br>
题 目:<input type="text" name="examtitle" size="54" maxlength="100"><br>
答案A:<input type="text" name="answer1" size="28" maxlength="40"><br>
答案B:<input type="text" name="answer2" size="28" maxlength="40"><br>
答案C:<input type="text" name="answer3" size="28" maxlength="40"><br>
答案D:<input type="text" name="answer4" size="28" maxlength="40"><br>
正确答案:<select size="1" name="okanwser">
<option value="">请选择...</option>
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select><br><br> <input type="submit" value="提交新考题">
<input type="reset" value="重 写"><br>
<br>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -