📄 questgen.htm
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %>
<%@ page errorPage="QuestGen_error.jsp" %>
<%@ page import="java.io.*"%>
<jsp:useBean id="DBCon" class="jinghua.JinghuaConn" scope="session">
</jsp:useBean>
<jsp:useBean id="Tools" class="jinghua.Tools" scope="session">
</jsp:useBean>
<script language="javascript">
function CheckForm(f)
{
//获取HTML文本
if (editor.EditMode.checked==true)
document.form1.Content.value=editor.Composition.document.body.innerText;
else
document.form1.Content.value=editor.Composition.document.body.innerHTML;
//var v=document.form1.Content.value=editor.Composition.document.body.innerHTML;
//alert(v);
if (f.Answer.value.length < 1) // 没有输入答案
{
alert("您还没有输入答案!");
return false;
}
if( f.Mark.value.length<1)
{
alert("您还有输入该试题的分数!");
return false;
}
if(!isNumberString(f.Mark.value,"1234567890."))
{
alert("嘿!您在分数里填了东西,但怎么不是数字呢?\n");
return false;
}
return ture;
}
function isNumberString (InString,RefString)
{
if(InString.length==0) return (false);
for (Count=0; Count < InString.length; Count++) {
TempChar= InString.substring (Count, Count+1);
if (RefString.indexOf (TempChar, 0)==-1)
return (false);
}
return (true);
}
</script>
<HTML><HEAD><TITLE>在线测试</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
</HEAD>
<BODY>
<%!Connection con=null;
String teachID="";
%>
<%
if(con==null){
con=DBCon.getConnection();
}
%>
<FORM name=form1 action="updatetest.jsp" method=post onSubmit="return CheckForm(this)">
<input name="teacherID" type="hidden" value="<%=request.getParameter("teacherID")%>">
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<TD> </TD>
<TD rowSpan=2>
<DIV align=right><IMG src="images/onlinetest.gif"
width=208 height=97 border="0"></DIV></TD></TR>
<TR>
<TD height=55><IMG height=45 src="images/logo.gif"
width=160></TD>
</TR></TBODY></TABLE>
<TABLE height=15 cellSpacing=0 cellPadding=0 width="100%" align=center
bgColor=#d3add1 border=0>
<TBODY>
<TR>
<TD height=25>
<DIV
align=center>首页|高考通|中考通|共创题库|学员社区|我的共创|服务中心</DIV></TD></TR></TBODY></TABLE> <A
href="http://jsptestonline.cosoft.org.cn/">首页</A>--共创题库--试题录入
<P> </P>
<TABLE borderColor=#d3add1 height=742 width="100%" border=1>
<TBODY>
<TR>
<TD width="23%"
height=63 align="left" vAlign=middle background=images/lvbgcolor.gif>
<P><BR>
题目类型:
<select id=QuestType name=QuestType>
<%Tools.showOption("select * from QuestType",con,out);%>
</select>
</P></TD>
<TD width="77%" height="200" rowSpan=4 align=center vAlign=middle
background=images/lvbgcolor.gif>
<table width="100%" height="405" border="0">
<tr>
<td height="53" colspan="2"><br>
<table width="100%" height="15" border="1">
<tr>
<td width="15%" height="22">
<input name="group" type="radio" value="single" checked>
单题</td>
<td width="15%" height="22"> <br>
<input name="group" type="radio" value="suit">
套题 </td>
<td width="90%"><div align="center">名称:
<input name="suit_title" type="text" id="suit_title" size="40" maxlength="200">
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="303" colspan="2"><iframe src="../editor/edit.jsp" id='editor' frameborder=0 scrolling=auto width=544 height=321>
</iframe> <textarea name="Content" style="display:none"></textarea>
</td>
</tr>
<tr>
<td width="19%" height="41"> </td>
<td width="81%"> </td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p></TD>
</TR>
<TR>
<TD width="23%"
height=50 align="left" vAlign=middle background=images/lvbgcolor.gif><BR>
科 目:
<SELECT id=select name=Subject>
<%Tools.showOption("select * from subject order by id",con,out);%>
</SELECT>
</TD>
</TR>
<TR>
<TD width="23%"
height=50 align="left" vAlign=top background=images/lvbgcolor.gif><BR>
年 级:
<SELECT id=select4 name=Grade>
<%Tools.showOption("select * from grade order by id",con,out);%>
</SELECT>
</TD>
</TR>
<TR>
<TD width="23%"
height=275 align="center" vAlign=top background=images/lvbgcolor.gif>
<table width="100%" height="60%" border="0">
<tr>
<td width="46%" height="77">测试点1:</td>
<td width="54%"><select id=select11 name=TestPoint1>
<%Tools.showOption("select * from testpoint order by id",con,out);%>
</select></td>
</tr>
<tr>
<td height="39">测试点2:</td>
<td><select id=select2 name=TestPoint2>
<%Tools.showOption("select * from testpoint order by id",con,out);%>
</select></td>
</tr>
<tr>
<td height="59">测试点3:</td>
<td><select id=select3 name=TestPoint3>
<%Tools.showOption("select * from testpoint order by id",con,out);%>
</select></td>
</tr>
</table>
<BR>
</TD>
</TR>
<TR>
<TD width="23%" vAlign=center background=images/lvbgcolor.gif><table width="100%" height="121" border="0">
<tr>
<td>知识点1:</td>
<td><SELECT name=KnowPoint1 id="select8">
<% Tools.showOption("select * from knowpoint order by id",con,out);%>
</SELECT></td>
</tr>
<tr>
<td height="38">知识点2:</td>
<td><SELECT name=KnowPoint2 id="select9">
<% Tools.showOption("select * from knowpoint order by id",con,out);%>
</SELECT></td>
</tr>
<tr>
<td>知识点3:</td>
<td><SELECT name=KnowPoint3 id="select10">
<% Tools.showOption("select * from knowpoint order by id",con,out);%>
</SELECT></td>
</tr>
</table>
<BR> <BR>
</TD>
<TD width="77%" align=center vAlign=top
background=images/lvbgcolor.gif><br> <table width="73%" border="0">
<tr>
<td width="35%" height="39" align="left">答案:
<input name="Answer" type="text" id="Answer" value="A" size="10"></td>
<td width="36%" align="left">分数:
<input name="Mark" type="text" id="Mark" value="5" size="10"></td>
<td width="29%" rowspan="2" align="left">难易度:
<select name=Difficulty id="select7">
<option value="A" selected>A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
<option value="E">E</option>
</select></td>
</tr>
<tr>
<td colspan="2" rowspan="2" align="center" valign="middle"> <input type="submit" name="Submit" value="提交">
<input name="Reset_Quest" type="reset" id="Reset_Quest3" value="重置">
</td>
</tr>
<tr>
<td width="29%" height="40" valign="top"> </td>
</tr>
</table>
</TD>
</TR>
</TBODY>
</TABLE>
<P> </P>
<P> </P>
<P> </P></FORM>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -