#12004/10/21 19:15:17
以下是代码,文件扩展名是aspx
<html>
<script language="vb" runat=server>
sub lstclick(sender as object, E as eventargs)
dim strtemp
dim inti
strtemp="<br>"
for inti=0 to lstbox.items.count-1
if lstbox.item(inti).selected then
select case lstbox.items(inti).value
case"+"
strtemp=strtemp&"3+2=5<br>"
case"-"
strtemp=strtemp&"3-2=1<br>"
case"*"
strtemp=strtemp&"3*2=6<br>"
case"/"
strtemp=strtemp&"3/2=1.5<br>"
end select
end if
next
labcontent.text=strtemp
end sub
</script>
<body>
请选择计算题:<br>
<form runat="server">
<asp:listbox id="lstbox" runat=server autopostback=true selectionmode="single"
rows=3 onselectedindexchanged="lstclick">
<asp:listitem text="3+2=?" value="+" selected="false"/>
<asp:listitem text="3-2=?" value="-" selected="false"/>
<asp:listitem text="3*2=?" value="*" selected="false"/>
<asp:listitem text="3/2=?" value="/" selected="false"/>
</asp:listbox>
<hr>
<asp:label runat=server id=labcontent/>
</form>
</body>
</html>
为什么运行之后<form></form>那部分显示不出来
请帮帮我,谢谢!!!