⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stu_test_free.jsp

📁 在线考试软件。 在线考试软件详细设计说明书:说明在线测试这一模块各部分的功能和结构
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ page import="java.util.*,
	 java.sql.*,
	 java.lang.*" %>


<%@ page contentType="text/html; charset=gb2312" language="java"%>
<%@ page import="java.sql.*" %>
<%@ page import="jinghua.*"%>
<jsp:useBean id="DBCon" class="jinghua.JinghuaConn" scope="session">
</jsp:useBean>
<%!Connection con;
boolean debug=false;
String studentID="";
String gradenote="";
Statement stmt=null;
ResultSet rs=null;
String sql="";
%>
<%
try{
    studentID=(String)session.getAttribute("studentID");
    if(studentID==null){
        throw new Exception();
    }
}catch(Exception e){
    Tools.showalert("您还没有登录,或连接超时,请重新登录!",out);
   Tools.showJS("window.open('../login.jsp','_self')",out);
}


try{
    con=DBCon.getConnection();
    //获取学生的年级信息
    //sql="select id,gradenote,grade.Name as gn "+
    //"from student  INNER JOIN grade ON (student.gradenote = grade.note) "+
    //" where stuid='"+studentID+"'";
    sql="select id,gradenote from UserInfo where vcUserNo='"+studentID+"'";

    try{
        stmt=con.createStatement();
        rs=stmt.executeQuery(sql);
        if(rs.next()){
            gradenote=rs.getString("gradenote");
            rs.close();
            stmt.close();
        }
        if(debug){
            out.print("<br>stuID="+studentID+"<br>gradenote="+gradenote);
        }
    }
    catch(SQLException se){
        out.print("<br> query student error sql="+sql);
        out.print("<br>"+se.toString());
    }
    catch(Exception e){
        out.print("<br> query student error sql="+sql);
        out.print("<br>"+e.toString());
    }
    //--年级,科目,知识点三个下拉列表框联动-->
    out.print(Tools.sub_know(con));
    //out.print(Tools.grade_sub(con));





%>













<!--年级,科目,知识点三个下拉列表框联动-->

<script language="JavaScript">


function changesk(locationid){
	document.myform.KnowPoint.length =1;
	var locationid=locationid;
	var i;
	for (i=0;i < gskcount; i++){
		if (grade_sub_know[i][1] == locationid){
			document.myform.KnowPoint.options[document.myform.KnowPoint.length] = new Option(grade_sub_know[i][3], grade_sub_know[i][2]);
		}
	}
}


</script>


<script language="javascript">
function CheckForm(f)
{

	if( f.testnumber.value.length<1)
	{
	    alert("您还有输入测验的试题数!");
		return false;
	}

	if(!isNumberString(f.testnumber.value,"1234567890."))
	{
	    alert("嘿!您在试题数里填了东西,但怎么不是数字呢?\n");
	    return false;
	}else if(f.testnumber.value<10){
            alert("每次测验至少要有10道试题!!");
            return false;
	}else if(f.testnumber.value>100){
            alert("学堂提供最多100道试题的测验!!");
            return false;
	}


	if( !(f.testorder[0].checked || f.testorder[1].checked||f.testorder[2].checked) ) {
		alert("您还没有选择测试顺序!")
		return false;
	}

	return true;
}

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">
<LINK
href="style/style.css" type=text/css rel=stylesheet>
<SCRIPT src="js/html.js"></SCRIPT>

<SCRIPT src="js/gnb_menus_layer.js"></SCRIPT>

<SCRIPT src="js/menu.js"></SCRIPT>

<SCRIPT src="js/jumpmenu.js"></SCRIPT>

<SCRIPT src="js/Valid.js"></SCRIPT>

<META content="MSHTML 6.00.2722.900" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff text=#000000 vlink="#0000FF"  >
<CENTER>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
      <TD vAlign=bottom align=right width=160><A
      href="http://jsptestonline.cosoft.org.cn/"><IMG height=45 src="images/logo.gif"
      width=160></A></TD>
    <TD align=right>
      <TABLE cellSpacing=0 cellPadding=0 width=260 border=0>
        <TBODY>
        <TR>
            <TD vAlign=bottom width=7 bgColor=#b2aeb8><IMG height=18
            src="images/pic_top_y.gif" width=7></TD>
          <TD align=right bgColor=#b2aeb8>
            <TABLE height=18 cellSpacing=0 cellPadding=0 width=240 border=0>
              <TBODY>
              <TR>
                  <TD><IMG height=11 src="images/ico_t_mail.gif"
                width=13></TD>
                <TD><A class=black
                  href="http://jsptestonline.cosoft.org.cn/help/use/use_004.jsp">在线咨询</A></TD>
                  <TD><IMG height=15 src="images/ico_t_help.gif"
                width=13></TD>
                <TD><A class=black
                  href="http://jsptestonline.cosoft.org.cn/help/buy/buy_001.jsp">申请服务</A></TD>
                  <TD><IMG height=13 src="images/ico_t_lc.gif"
                width=14></TD>
                <TD><A class=black
                  href="http://jsptestonline.cosoft.org.cn/help/product/pro_001.jsp">产品介绍</A></TD>
                  <TD width=10><IMG height=10 src="images/blank.gif"
                  width=10></TD>
                </TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
      <TABLE height=12 cellSpacing=0 cellPadding=0 width=100 border=0>
        <TBODY>
        <TR>
            <TD><IMG height=1 src="images/blank.gif"
        width=618></TD>
          </TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0>
        <TBODY>
        <TR>
          <TD>
            <TABLE style="PADDING-BOTTOM: 1px" cellSpacing=0 cellPadding=0
            border=0>
              <TBODY>
              <TR>
                        <TD id=gnb_link_www
                onmouseover="javascript:showSubMenuLayer('www')"
                style="POSITION: relative"
                onmouseout="javascript:hideSubMenuLayer('www')" align=middle
                width=40><SPAN class=gnbMenu><A id=gnb_link_text_www
                  style="POSITION: relative"
                  href="http://jsptestonline.cosoft.org.cn/index.jsp">首页</A></SPAN></TD>
                  <TD><IMG height=7 src="images/pic_top_line.gif"
                width=1></TD>
                        <TD id=gnb_link_senior
                onmouseover="javascript:showSubMenuLayer('senior')"
                style="POSITION: relative"
                onmouseout="javascript:hideSubMenuLayer('senior')" align=middle
                width=70><SPAN class=gnbMenu><A id=gnb_link_text_senior
                  style="FONT-WEIGHT: bold; COLOR: #b77bb4; POSITION: relative"
                  href="http://jsptestonline.cosoft.org.cn/senior/index.jsp">高考通</A></SPAN></TD>
                  <TD><IMG height=7 src="images/pic_top_line.gif"
                width=1></TD>
                        <TD id=gnb_link_junior
                onmouseover="javascript:showSubMenuLayer('junior')"
                style="POSITION: relative"
                onmouseout="javascript:hideSubMenuLayer('junior')" align=middle
                width=70><SPAN class=gnbMenu><A id=gnb_link_text_junior
                  style="POSITION: relative"
                  href="http://jsptestonline.cosoft.org.cn/junior/index.jsp">中考通</A></SPAN></TD>
                  <TD><IMG height=7 src="images/pic_top_line.gif"
                width=1></TD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -