Foxtable(狐表)用户栏目专家坐堂 → 移动端参数的调用问题


  共有2210人关注过本帖树形打印复制链接

主题:移动端参数的调用问题

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110592 积分:562856 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/10/26 16:52:00 [显示全部帖子]

方法1、url参数传递

With wb.AddButtonGroup("form1","btg1",True)  '垂直排列
    .Add("btn1", "按钮")
    .Add("btn4", "按钮", "reset")
    .Add("btn5", "按钮", "", "http://www.foxtable.com?id=123456") '传递名称为id,值为123456的参数
End With


3、表单提交

Select Case e.Path
    Case "test.htm"
        Dim wb As New weui
        wb.AddForm("","form1","other.htm")
        With wb.AddInputGroup("form1","ipg1","登录")
            .AddInput("xm","户名","text")
            .AddInput("pw","密码","password")
        End With
        With wb.AddButtonGroup("form1","btg1",True)
            .Add("btn1", "确定", "submit")
        End With
        e.WriteString(wb.Build) '生成网页
End Select

数据接收
Select Case e.Path
    Case "test.htm"
        Dim wb As New weui
        wb.AddForm("","form1","other.htm")
        With wb.AddInputGroup("form1","ipg1","登录")
            .AddInput("xm","户名","text")
            .AddInput("pw","密码","password")
        End With
        With wb.AddButtonGroup("form1","btg1",True)
            .Add("btn1", "确定", "submit")
        End With
        e.WriteString(wb.Build) '生成网页
        
    Case "other.htm"
        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. Values.Keys
            sb.AppendLine(key & ":" & e.Values(key) & "<br/>")
        Next
        e.WriteString(sb.ToString)
End Select


 回到顶部