老师请问,我做一个问卷调查,请问怎么样做 选好答案后,按提交按钮,我后台能自动统计出 问题1 选A 一共多少人 选B一共多少人,问题2 选A 一共多少人 选B一共多少人 ........
此主题相关图片如下:企业微信截图_20191217135519.png
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
Select Case e.Path
Case "WJDC.htm"
If e.PostValues.Count = 0 Then
wb.AddForm("","form1","WJDC.htm")
With wb.AddRadioGroup("form1","问题1","问题1")
.Add("A1","A. 答案1")
.Add("B1","B. 答案2")
.Add("C1","C. 答案3")
.Add("D1","D. 答案4")
.Add("E1","E. 答案5")
End With
With wb.AddRadioGroup("form1","问题2","问题2")
.Add("A2","A. 答案1")
.Add("B2","B. 答案2")
.Add("C2","C. 答案3")
.Add("D2","D. 答案4")
.Add("E2","E. 答案5")
End With
With wb.AddRadioGroup("form1","问题3","问题3")
.Add("A3","A. 答案1")
.Add("B3","B. 答案2")
.Add("C3","C. 答案3")
.Add("D3","D. 答案4")
.Add("E3","E. 答案5")
End With
With wb.AddRadioGroup("form1","问题4","问题4")
.Add("A4","A. 答案1")
.Add("B4","B. 答案2")
.Add("C4","C. 答案3")
.Add("D4","D. 答案4")
.Add("E4","E. 答案5")
End With
With wb.AddRadioGroup("form1","问题5","问题5")
.Add("A5","A. 答案1")
.Add("B5","B. 答案2")
.Add("C5","C. 答案3")
.Add("D5","D. 答案4")
.Add("E5","E. 答案5")
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "提交", "submit")
End With
e.WriteString(wb.Build)
Else
Dim sb As New StringBuilder
sb.AppendLine("<meta name='viewport' c>")
sb.AppendLine("接收到的数据有:<br/><br/>")
For Each key As String In e.PostValues.Keys
sb.AppendLine(key & ":" & e.PostValues(key) & "<br/>")
Next
e.WriteString(sb.ToString)
End If
End Select
[此贴子已经被作者于2019/12/17 14:01:47编辑过]