'通用事件头
Dim fl As String = "d:\web\" & e.path
If filesys.FileExists(fl)
Dim idx As Integer = fl.LastIndexOf(".")
Dim ext As String = fl.SubString(idx)
Select Case ext
Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar"
e.WriteFile(fl)
Return '这里必须返回
End Select
End If
Dim wb As New weui
Select Case e.path
Case "fankui.htm" '访问的网址
wb.AddPageTitle("","pageheader","培训系列","培训反馈系统")
If e.PostValues.count = 0 Then
wb.AddForm("","form1","fankui.htm") '接收数据的网址
With wb.AddInputGroup("form1","培训主题","培训主题") '定义输入框组
.Addinput("培训课程","培训课程","text")
.Addinput("培训讲师","培训讲师","text")
.Addinput("培训日期","培训日期","date")
End With
With wb.AddArticle("form1","ar1")
.AddContent("本反馈表为不记名填写,主要目的在于了解您对本次培训的整体评价,请实事求是按照下列所给予的指标要素对本次培训给予客观评价.我们期望通过本表了解你真实?具体的感受和建议,以便我们更有效的设计培训课程,改善培训工作!")
End With
With wb.AddInputGroup("form1","培训内容","培训内容评价") '定义输入框组
.AddSelect("你对培训内容的理解程度","你对培训内容的理解程度"," |完全|大部分|小部分|不理解")
.AddSelect("对工作的帮助作用程度","对工作的帮助作用程度"," |很大|较大|一般|无帮助")
.AddSelect("与您的期望符合程度","与您的期望符合程度","|很符合|符合|一般|不符合")
End With
With wb.AddInputGroup("form1","培训讲师","培训讲师评价") '定义输入框组
.AddSelect("信息量大,知识面广","信息量大,知识面广"," |很好|良好|一般|不好")
.AddSelect("系统性强,重点明确","系统性强,重点明确"," |很好|良好|一般|不好")
.AddSelect("语言流畅,清晰易懂","语言流畅,清晰易懂"," |很好|良好|一般|不好")
.AddSelect("互动性强,形式灵活","互动性强,形式灵活"," |很好|良好|一般|不好")
.AddSelect("联系实际,课程合理","联系实际,课程合理"," |很好|良好|一般|不好")
End With
With wb.AddInputGroup("form1","最终评价","最终评价") '定义输入框组
.AddSelect("您对此次培训课程满意程度","您对此次培训课程满意程度"," |很满意|满意|一般|不满意")
.AddSelect("以后还愿意参加学习机会吗","以后还愿意参加学习机会吗"," |很愿意|愿意|一般|不愿意")
.AddTextArea("您对本次培训的良好建议",5).Placeholder = "您对本次培训的良好建议" '5代表行数
.AddTextArea("您期望公司以后安排哪些培训",5).Placeholder = "您期望公司以后安排哪些培训" '5代表行数
End With
With wb.AddCheckGroup("form1","rdg2","您对本次培训的收获(可多选")
.Add("sh1","获得适用的新知识")
.Add("sh2","可以获得可操作的工作技巧")
.Add("sh3","帮助您改变自己的工作态度")
.Add("sh4","给您一个与同事有益的交流机会")
.Add("sh5","给您一些新的思想理念")
.Add("sh6","通过案列学习了相关技巧")
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("<form1 enctype='multipart/form-data'action='fankui.htm?培训课程=培训&培训讲师=张三&培训日期=20170605' method='post' 培训课程='form1' 培训讲师='form1' 培训日期='form1'>")
sb.AppendLine("接收到的数据有:<br/><br/>")
For Each key As String In e.GetValues.Keys
sb.AppendLine(key & ":" & e.GetValues(key) & "<br/>")
Next
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