Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:weui框架开发,区分多个按钮,怎么判断是哪个按钮?

1楼
zhchling 发表于:2025/1/9 14:58:00
怎么在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编辑过]
2楼
有点蓝 发表于: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"
3楼
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编辑过]
4楼
有点蓝 发表于:2025/1/9 16:09:00
http://www.foxtable.com/mobilehelp/topics/0113.htm


if e.GetValues("btn")  = 3 then
msgbox("按钮3")
共4 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03516 s, 2 queries.