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