以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- weui框架开发,区分多个按钮,怎么判断是哪个按钮? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=194741) |
-- 作者:zhchling -- 发布时间:2025/1/9 14:58:00 -- weui框架开发,区分多个按钮,怎么判断是哪个按钮? 怎么在accept.htm 里面判断是哪个按钮? btn1 If “什么语法” = "btn2" Then flt = "日期=\'" & Date.today.AddDays(1) & "\'" End If Dim wb
As New weui
Select Case e.Path Case "input.htm" If e.PostValues.Count = 0 Then wb.AddForm("","form1","input.htm") With wb.AddInputGroup("form1","ipg1","数据输入") .AddInput("客户","客户","text") .AddInput("日期","日期","date") .Addinput("产品","产品","text") .Addinput("数量","数量","number") End With With wb.AddButtonGroup("form1","btngrp1",False) .Add("btn1", "按钮1", "submit").Value = "btn1" .Add("btn2", "按钮2", "submit").Value = "btn2" .Add("btn3", "按钮3", "submit").FormAction = "accept.htm" .Add("btn4", "按钮4", "submit").FormAction = "accept.htm?type=1&model=ha" End With Else wb.InsertHTML("接收到的数据有:<br/>") For Each key As String In e.PostValues.Keys wb.InsertHTML(key & ":" & e.PostValues(key) & "<br/>") Next End If Case "accept.htm" wb.InsertHTML("通过accept.htm接收到的数据有:<br/>") For Each key As String In e.PostValues.Keys wb.InsertHTML(key & ":" & e.PostValues(key) & "<br/>") Next End Select e.WriteString(wb.Build) [此贴子已经被作者于2025/1/9 14:59:17编辑过]
|
-- 作者:有点蓝 -- 发布时间:2025/1/9 15:18:00 -- 加多一个参数区分 .Add("btn3", "按钮3", "submit").FormAction = "accept.htm?btn=3"
.Add("btn4", "按钮4", "submit").FormAction = "accept.htm?btn=4&type=1&model=ha" |
-- 作者:zhchling -- 发布时间:2025/1/9 15:33:00 -- 在accept.htm 里 怎么判断? If e.postvalues.value = 3 Then ????????????????? flt = "日期=\'" & Date.today & "\'" e.PostValues("startdate") = Date.today End If e.postvalues的语法帮助在哪里有 [此贴子已经被作者于2025/1/9 15:34:02编辑过]
|
-- 作者:有点蓝 -- 发布时间:2025/1/9 16:09:00 -- http://www.foxtable.com/mobilehelp/topics/0113.htm if e.GetValues("btn") = 3 then msgbox("按钮3")
|