在线考试系统
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat ="server" >
Sub submit_click(ByVal sender As Object, ByVal e As EventArgs)
Dim grade As Integer
'单选
If RadioButtonList1.SelectedIndex = "2" Then
grade = grade + 10
Else
a.Visible = True
Image1.Visible = True
End If
If RadioButtonList2.SelectedIndex = "2" Then
grade = grade + 10
Else
b.Visible = True
Image2.Visible = True
End If
If RadioButtonList3.SelectedIndex = "2" Then
grade = grade + 10
Else
c.Visible = True
Image3.Visible = True
End If
If RadioButtonList4.SelectedIndex = "2" Then
grade = grade + 10
Else
d.Visible = True
Image4.Visible = True
End If
If RadioButtonList5.SelectedIndex = "2" Then
grade = grade + 10
Else
f.Visible = True
Image5.Visible = True
End If
'多选
If CheckBoxList1.Items(0).Selected = False And CheckBoxList1.Items(1).Selected = True And CheckBoxList1.Items(2).Selected = True And CheckBoxList1.Items(3).Selected = True Then
grade = grade + 10
Else
g.Visible = True
Image6.Visible = True
End If
If CheckBoxList2.Items(0).Selected = False And CheckBoxList2.Items(1).Selected = False And CheckBoxList2.Items(2).Selected = True And CheckBoxList2.Items(3).Selected = False And CheckBoxList2.Items(4).Selected = True And CheckBoxList2.Items(5).Selected = True And CheckBoxList2.Items(6).Selected = True Then
grade = grade + 10
Else
h.Visible = True
Image7.Visible = True
End If
If CheckBoxList3.Items(0).Selected = True And CheckBoxList3.Items(1).Selected = True And CheckBoxList3.Items(2).Selected = True And CheckBoxList3.Items(3).Selected = False Then
grade = grade + 10
Else
i.Visible = True
Image8.Visible = True
End If
If CheckBoxList4.Items(0).Selected = True And CheckBoxList4.Items(1).Selected = True And CheckBoxList4.Items(2).Selected = False And CheckBoxList4.Items(3).Selected = True And CheckBoxList4.Items(4).Selected = True Then
grade = grade + 10
Else
j.Visible = True
Image9.Visible = True
End If
If CheckBoxList5.Items(0).Selected = True And CheckBoxList5.Items(1).Selected = True And CheckBoxList5.Items(2).Selected = False And CheckBoxList5.Items(3).Selected = True Then
grade = grade + 10
Else
k.Visible = True
Image10.Visible = True
End If
Dim objLabel As New Label
objLabel.ID = "message"
objLabel.Text = "您的得分为:" & grade & "分 !"
'动态产生控件的应用样式的改变?
'objLabel.Style = "background-color:#ffffff;border-width:1;border-style:solid"
Page.Controls.Add(objLabel)
If grade = 100 Then
MsgBox("哦啊!您真了不起,得了满分耶!", 1, "恭喜( ^_^ )")
End If
submit.Enabled = False
reset.Enabled = False
End Sub
Sub reset_click(ByVal sender As Object, ByVal e As EventArgs)
End Sub
</script>
<!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 id="Head1" runat="server">
<title>在线考试</title>
</head>
<body style="background-attachment: scroll; background-image: url(images/bg.jpg); background-repeat: repeat;" leftmargin = "60" >
<h2 align ="center" >在线考试</h2>
<form id="form1" runat="server">
一、单选(每小题十分,共50分)
<br /> <br />
<strong><span lang="EN-US" style="font-size: 10.5pt; font-family: 'Tahoma','sans-serif';">1、</span>
<span lang="EN-US" style="font-size: 10.5pt; font-family: 'Tahoma','sans-serif'; ">Do you have a preference _____ a particular food?<asp:Image ID="Image1" Visible ="false" runat="server" ImageUrl="~/images/错误.gif" /></span></strong>
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
<asp:ListItem>A.with</asp:ListItem>
<asp:ListItem>B.at</asp:ListItem>
<asp:ListItem>C.for</asp:ListItem>
<asp:ListItem>D.in</asp:ListItem>
</asp:RadioButtonList><br />
<div id = "a" visible = "false" style ="font-size: 10.5pt; color: red; font-family: 'Tahoma','sans-serif'; " runat ="server" >
<strong><span style="font-size: 12pt">正确答案为:C</span></strong></div>
<strong><span lang="EN-US" style="font-size: 10.5pt; font-family: 'Tahoma','sans-serif';">2、</span>
<span lang="EN-US" style="font-size: 10.5pt; font-family: 'Tahoma','sans-serif'; ">By now most freshmen have grown so used to university life that they have forgotten all those ______ about the university they originally had.</span></strong>
<asp:Image ID="Image2" Visible ="false" runat="server" ImageUrl="~/images/错误.gif" />
<asp:RadioButtonList ID="RadioButtonList2" runat="server">
<asp:ListItem>A.concerns</asp:ListItem>
<asp:ListItem>B.worry</asp:ListItem>
<asp:ListItem>C.dreams</asp:ListItem>
<asp:ListItem>D.ambition</asp:ListItem>
</asp:RadioButtonList><br />
<div id = "b" visible ="false" style ="font-size: 10.5pt; color: red; font-family: 'Tahoma','sans-serif'; " runat ="server">
<span style="font-size: 12pt"><strong>正确答案为:C</strong></span></div>
<strong><span lang="EN-US" style="font-size: 10.5pt; font-family: 'Tahoma','sans-serif';">3、</span>
<span lang="EN-US" style="font-size: 10.5pt; font-family: 'Tahoma','sans-serif'; ">Many people want to buy it because,____ , the price is reasonable; ____ , it's rather durable.</span></strong>
<asp:Image ID="Image3" Visible ="false" runat="server" ImageUrl="~/images/错误.gif" />
<asp:RadioButtonList ID="RadioButtonList3" runat="server">
<asp:ListItem>A.on one side, on the other side</asp:ListItem>
<asp:ListItem>B.for one thing, for another</asp:ListItem>
<asp:ListItem>C.on the one hand, on the other hand</asp:ListItem>
<asp:ListItem>D.in one part, in the other part</asp:ListItem>
</asp:RadioButtonList><br />
<div id = "c" visible ="false" style ="font-size: 10.5pt; color: red; font-family: 'Tahoma','sans-serif'; " runat ="server">
<span style="font-size: 12pt"><strong>正确答案为:C</strong></span></div>
<strong><span lang="EN-US" style="font-size: 10.5pt; font-family: 'Tahoma','sans-serif';">4、</span>
<span lang="EN-US" style="font-size: 10.5pt; font-family: 'Tahoma','sans-serif'; ">The proposal ____ we start doing the experiment two days earlier has been agreed upon by all.</span></strong> <asp:Image ID="Image4" Visible ="false" runat="server" ImageUrl="~/images/错误.gif" />
<asp:RadioButtonList ID="RadioButtonList4" runat="server">
<asp:ListItem>A.which</asp:ListItem>
<asp:ListItem>B.what</asp:ListItem>
<asp:ListItem>C.that</asp:ListItem>
<asp:ListItem>D.of which</asp:ListItem>
</asp:RadioButtonList><br />
<div id = "d" visible ="false" style ="font-size: 10.5pt; color: red; font-family: 'Tahoma','sans-serif'; " runat ="server">
<span style="font-size: 12pt"><strong>正确答案为:C</strong></span></div>
<strong><span lang="EN-US" style="font-size: 10.5pt; font-family: 'Tahoma','sans-serif';">5、</span>
<span lang="EN-US" style="font-size: 10.5pt; font-family: 'Tahoma','sans-serif'; ">____ , we may look forward to better weather.</span></strong>
<asp:Image ID="Image5" Visible ="false" runat="server" ImageUrl="~/images/错误.gif" />
<asp:RadioButtonList ID="RadioButtonList5" runat="server">
<asp:ListItem>A.comes</asp:ListItem>
<asp:ListItem>B.has come</asp:ListItem>
<asp:ListItem>C.to be coming</asp:ListItem>
<asp:ListItem>D.having come</asp:ListItem>
</asp:RadioButtonList>
<div id ="f" visible = "false" style="font-size: 10.5pt; color: red; font-family: 'Tahoma','sans-serif'; " runat ="server">
<span style="font-size: 12pt"><strong>正确答案为:C</strong></span></div>
<br /><br /><br />
二、多选(每小题十分,共50分)<br />
1.中国三大国粹;<asp:Image ID="Image6" Visible ="false" runat="server" ImageUrl="~/images/错误.gif" />
<asp:CheckBoxList ID="CheckBoxList1" runat="server">
<asp:ListItem>瓷器</asp:ListItem>
<asp:ListItem>中国画</asp:ListItem>
<asp:ListItem>京剧</asp:ListItem>
<asp:ListItem>中医</asp:ListItem>
</asp:CheckBoxList><br />
<div id ="g" visible = "false" style="font-size: 10.5pt; color: red; font-family: 'Tahoma','sans-serif'; " runat ="server">
<span style="font-size: 12pt"><strong>正确答案为:中国画、京剧、中医</strong></span></div>
2.四大民间传说:<asp:Image ID="Image7" Visible ="false" runat="server" ImageUrl="~/images/错误.gif" /><br />
<asp:CheckBoxList ID="CheckBoxList2" runat="server">
<asp:ListItem>窦娥冤</asp:ListItem>
<asp:ListItem>西厢记</asp:ListItem>
<asp:ListItem>牛郎织女</asp:ListItem>
<asp:ListItem>牡丹亭</asp:ListItem>
<asp:ListItem>梁山伯与祝英台</asp:ListItem>
<asp:ListItem>白蛇传</asp:ListItem>
<asp:ListItem>孟姜女</asp:ListItem>
</asp:CheckBoxList><br />
<div id ="h" visible = "false" style="font-size: 10.5pt; color: red; font-family: 'Tahoma','sans-serif'; " runat ="server">
<span style="font-size: 12pt"><strong>正确答案为:牛郎织女、梁山伯与祝英台、白蛇传、孟姜女</strong></span></div>
3. 建安七子中有三曹:<asp:Image ID="Image8" Visible ="false" runat="server" ImageUrl="~/images/错误.gif" /><br />
<asp:CheckBoxList ID="CheckBoxList3" runat="server">
<asp:ListItem>曹操</asp:ListItem>
<asp:ListItem>曹丕</asp:ListItem>
<asp:ListItem>曹植</asp:ListItem>
<asp:ListItem>曹冲</asp:ListItem>
</asp:CheckBoxList> <br />
<div id ="i" visible = "false" style="font-size: 10.5pt; color: red; font-family: 'Tahoma','sans-serif'; " runat ="server">
<span style="font-size: 12pt"><strong>正确答案为:曹操、曹丕、曹植</strong></span></div>
4.四大大名楼:<asp:Image ID="Image9" Visible ="false" runat="server" ImageUrl="~/images/错误.gif" /><br />
<asp:CheckBoxList ID="CheckBoxList4" runat="server">
<asp:ListItem>湖南岳阳岳阳楼</asp:ListItem>
<asp:ListItem>江西南昌滕王阁</asp:ListItem>
<asp:ListItem>山西永济鹳雀楼</asp:ListItem>
<asp:ListItem>湖北武汉黄鹤楼</asp:ListItem>
<asp:ListItem>云南昆明大观楼</asp:ListItem>
</asp:CheckBoxList><br />
<div id ="j" visible = "false" style="font-size: 10.5pt; color: red; font-family: 'Tahoma','sans-serif'; " runat ="server">
<span style="font-size: 12pt"><strong>正确答案为:湖南岳阳楼、江西滕王阁、湖北黄鹤楼、昆明大观楼</strong></span></div>
5.以下是古代名医的是:<asp:Image ID="Image10" Visible ="false" runat="server" ImageUrl="~/images/错误.gif" /><br />
<asp:CheckBoxList ID="CheckBoxList5" runat="server">
<asp:ListItem>扁鹊</asp:ListItem>
<asp:ListItem>张仲景</asp:ListItem>
<asp:ListItem>贾思勰</asp:ListItem>
<asp:ListItem>淳于意</asp:ListItem>
</asp:CheckBoxList><br />
<div id ="k" visible = "false" style="font-size: 10.5pt; color: red; font-family: 'Tahoma','sans-serif'; " runat ="server">
<span style="font-size: 12pt"><strong>正确答案为:扁鹊、张仲景、淳于意</strong></span></div>
<br />
<p align ="center" >
<asp:Button ID="submit" Text = "交 卷" OnClick ="submit_click" runat="server" />
<asp:Button ID ="reset" Text = "重 置" OnClick = "reset_click" runat ="server" />
</p>
</form>
</body>
</html>
5
147
138KB
2009-10-26
9