你好,欢迎来到电脑编程技巧与维护杂志社! 杂志社简介广告服务读者反馈编程社区  
合订本订阅
 
 
您的位置:杂志经典 / 跟高手学编程
ASP技术建立网络调查投票系统(十一)
 

rs.open "select * from 测试表 where 项目类别=0",c1,1,1

'此为单选题,项目类别=0为单选,项目类别=1为多选

for i=1 to rs.recordcount

tp_flag=0

tp_flag_count=0

'利用循环把测试题目全部显示出来%>   

&nbsp;<b><%=i%><%=rs("测试标题")%></b>&nbsp;<%=trim(rs(“分值”))%><br> 

<input type=hidden name=na<%=i%> value=<%=rs("id")%>>

<%tp_flag=split(server.htmlencode(replace(trim(rs("测试内容")),chr(10),"")),chr(13))

'利用chr(13)来分割选项

  for e=0 to ubound(tp_flag)

'表示通过split分割后形成数组后的最后一个值

  if trim(tp_flag(e))<>"" then

   tp_flag_count=tp_flag_count+1

 %>  &nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" value=<%=tp_flag_count%> name=no<%=rs("id")%>>&nbsp;<%=xuanxiang(tp_flag_count)%><%=tp_flag(e)%><br>

   <%

 if tp_flag_count>=10 then exit for

 end if

 next%>

<br>

<%rs.movenext

next

rs.close%>

<input type=submit value="提交试卷" name=b1>&nbsp;&nbsp;<input type=reset value="重置" name=b1>

</form>

  推荐精品文章

·2024年12月目录 
·2024年11月目录 
·2024年10月目录 
·2024年9月目录 
·2024年8月目录 
·2024年7月目录 
·2024年6月目录 
·2024年5月目录 
·2024年4月目录 
·2024年3月目录 
·2024年2月目录 
·2024年1月目录
·2023年12月目录
·2023年11月目录

  联系方式
TEL:010-82561037
Fax: 010-82561614
QQ: 100164630
Mail:gaojian@comprg.com.cn

  友情链接
 
Copyright 2001-2010, www.comprg.com.cn, All Rights Reserved
京ICP备14022230号-1,电话/传真:010-82561037 82561614 ,Mail:gaojian@comprg.com.cn
地址:北京市海淀区远大路20号宝蓝大厦E座704,邮编:100089