日期:2010-03-31  浏览次数:21175 次

<%@ Language=VBScript %>
<%
if Request.ServerVariables("http_method")="POST" then
    if Request.Form("submit")="加入" then
    '处理加入试题请求
        set mrs=server.CreateObject("adodb.recordset")
        mrs.ActiveConnection="dsn=testsys"
        mrs.Source="select * from question"
        mrs.Open ,,1,3
        '往数据库的表question中加入试题内容
        mrs.AddNew
        mrs("teachid")=session("teachid")
        mrs("sub")=Request.Form("selsub")
        mrs("question")=Request.Form("question")
        mrs("A")=Request.Form("opta")
        mrs("B")=Request.Form("optb")
        mrs("C")=Request.Form("optc")
        mrs("D")=Request.Form("optd")
        mrs("answer")=Request.Form("answer")
        mrs.Update
        mrs.Close
        set mrs=nothing
    end if
end if
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<FORM action="taddquestion.asp" method=post id=form1 name=form1>
<P><STRONG><FONT color=crimson face=幼圆
size=4>往试题库里加入试题</FONT></STRONG></P>

<P>课程---
<%Response.Write Request.Form("selsub")%></P>

<P>
<TABLE border=0 cellPadding=1 cellSpacing=1 width=90%>
    
    <TR>
        <TD>题目</TD></TR>
    <TR>
        <TD><TEXTAREA id=TEXTAREA1 name=question style="HEIGHT: 114px; WIDTH: 60%"></TEXTAREA></TD></TR>
    <TR>
        <TD>选择答案
    <TR>
        <TD>A.
<INPUT id=text1 name=opta style="HEIGHT: 21px; WIDTH: 40%">
    <TR>
        <TD>

<P>B.
<INPUT id=text2 name=optb style="HEIGHT: 21px; WIDTH: 40%"></P>
    <TR>
        <TD>C.
<INPUT id=text3 name=optc style="HEIGHT: 21px; WIDTH: 40%">
    <TR>
        <TD>

<P>D.
<INPUT id=text4 name=optd style="HEIGHT: 21px; WIDTH: 40%"></P>
    <TR>
        <TD>

<P>正确答案
<INPUT id=radio1 name=answer type=radio value=A>A
<INPUT id=radio2 name=answer type=radio value=B>B
<INPUT id=radio3 name=answer type=radio value=C>C