tSetrs1;sql="select*fromvotewhereflag="+id;?rs1=dbBean.executeQuery(sql);?out.print("<hr>");?//输出该主题的选项?while(rs1.next()){?id1=rs1.getInt("id");?optContent=rs1.getString("optContent");?if(optType==0)?type="radio";?else{?type="checkbox";}%><inputtype="<%=type%>"name="vote"value="<%=id1%>"><%=optContent%><br><%}%></div><hr><divalign="left"><%}%></div><inputtype="submit"name="sumbit1"value="确定"></form><%rs.close();%></center></body></html>2.result.jsp<%@pagecontentType="text/html;charset=gb2312"%><%@pageimport="java.sql.*"%><html><head><title>投票结果</title><linkhref="vote.css"rel="stylesheet"type="text/css"></head><body><jsp:useBeanid="dbBean"class="vote.DBConnect"scope="page"/><h3align="center">单选投票结果</h3><hr><%Stringsql="select*fromvoteorderbyid";ResultSetrs=dbBean.executeQuery(sql);Stringid;