以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]get方式提交 急急急 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=101651) |
-- 作者:188802386 -- 发布时间:2017/6/4 22:38:00 -- [求助]get方式提交 急急急 通过get方式提交的数据怎么显示空的呢 想实现get和post都有数据提交, \'通用事件头 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 Dim sb As New StringBuilder Select Case e.path Case "fankui.htm" \'访问的网址 \'Dim sb As New StringBuilder \'sb.AppendLine("<form enctype=\'multipart/form-data\'action=\'fankui.htm method=\'get\' 培训课程=\'form1\' 培训讲师=\'form1\' 培训日期=\'form1\'>") \'sb.AppendLine("</form>") wb.AddPageTitle("","pageheader","培训系列","培训反馈系统") If e.GetValues.Count = 3 Then \' End If \'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 nms() As String = {"培训课程","培训讲师","培训日期","你对培训内容的理解程度"} \'不能为空的列名数组 \'For Each nm As String In nms \'If e.PostValues.ContainsKey(nm) = False Then \'生成错误提示页 \'With wb.AddMsgPage("","msgpage","提交失败", nm & "不能为空!") \'.icon = "Warn" \'改变图标 \'.AddButton("btn1","返回").Attribute = "" \'End With \'e.WriteString(wb.Build) \'Return \'必须返回 \'End If \'Next \'Dim sb As New StringBuilder sb.AppendLine("<meta name=\'viewport\' c>") sb.AppendLine("<form enctype=\'multipart/form-data\'action=\'fankui.htm method=\'get\' 培训课程=\'form1\' 培训讲师=\'form1\' 培训日期=\'form1\'>") sb.AppendLine("</form>") sb.AppendLine("通过GET方式提交的数据:<br/><br/>") For Each key As String In e.GetValues.Keys sb.AppendLine(key & ":" & e.GetValues(key) & "<br/>") Next sb.AppendLine("<br/><br/>通过POST方式提交的数据:<br/><br/>") For Each key As String In e.PostValues.Keys sb.AppendLine(key & ":" & e.PostValues(key) & "<br/>") Next \'dr.save() With wb.AddMsgPage("","msgpage","增加成功", "好好学习,天天向上") \'生成成功提示页 .AddButton("btn1","继续增加","addnew.htm") End With e.WriteString(sb.ToString) \'End If End If End Select |
-- 作者:188802386 -- 发布时间:2017/6/4 22:42:00 -- http://127.0.0.1/fankui.htm?%E5%9F%B9%E8%AE%AD%E8%AF%BE%E7%A8%8B=%E6%95%99%E7%A8%8B&%E5%9F%B9%E8%AE%AD%E8%AE%B2%E5%B8%88=%E6%9D%8E%E5%8A%9B&%E5%9F%B9%E8%AE%AD%E6%97%A5%E6%9C%9F=20170608截图 培训课程=培训&培训讲师=张三&培训日期=20170605 |
-- 作者:有点色 -- 发布时间:2017/6/5 9:15:00 -- 为什么做判断?直接用values,可以获取get或post的数据的啊
http://www.foxtable.com/mobilehelp/scr/0113.htm
|