以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- submitAjaxForm (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=148809) |
-- 作者:1498351234 -- 发布时间:2020/4/15 17:42:00 -- submitAjaxForm 调用submitAjaxForm函数,如何同时得到 input 组和按钮组的键和值。现用的函数只能得到input组的键和值。 |
-- 作者:有点蓝 -- 发布时间:2020/4/16 8:49:00 -- 要使用submitAjaxFileds,比如: Select Case e.Path Case "test.htm" If e.PostValues.count = 0 Then Dim wb As New weui wb.AddForm("","form1","test.htm") With wb.AddInputGroup("form1","ipg1","客户资料") .AddInput("姓名","姓名","Text") \'前一个"姓名"是ID,后一个"姓名"是标题 .AddInput("年龄","年龄","number") .AddInput("日期","日期","date") .AddSelect("级别","级别","普通会员|高级会员|VIP会员") .AddSwitch("停权","停权") End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") With .Add("btn2", "返回", "button") .value = "btn2" .Attribute = "onclick=""submitForm()""" End With End With wb.AppendHTML("<script src=\'./lib/ajaxform.js\'></script>") \'引入脚本文件 e.WriteString(wb.Build) \'生成网页 Else Dim sb As New StringBuilder sb.AppendLine("<meta name=\'viewport\' content=\'width=device-width,initial-scale=1,user-scalable=0\'>") 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 js function submitForm(){
var result =submitAjaxFileds(\'test.htm\',\'\',\'姓名\',\'btn2\',false)
alert(result); } |
-- 作者:1498351234 -- 发布时间:2020/4/16 9:42:00 -- 谢了。 |