-- 动态列表1对2
老师,这段代码我想输入型号之后自动填写规格跟颜色两个字段,这个要怎么改,因为需要的是1对2
Case "test.htm"
Dim wb As New weui
wb.AddForm("","form1","test.htm")
With wb.AddInputGroup("form1","ipg1","动态列表")
With .AddSelect("xh","型号","|" & DataTables("表A").GetComboListString("型号"))
.Attribute = """
End With
With .AddSelect("gg","规格","")
.Attribute = """
End With
.AddSelect("ys","颜色","")
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
End With
e.WriteString(wb.Build) \'生成网页
Case "getProducts.htm"
Dim vals As String
If e.PostValues.Count = 1 Then
vals = "|" & DataTables("表A").GetComboListString("规格","型号=\'" & e.PostValues("xh") & "\'")
ElseIf e.PostValues.Count = 2 Then
Dim Filter As String = "型号=\'" & e.PostValues("xh") & "\' And 规格=\'" & e.PostValues("gg") & "\'"
vals = "|" & DataTables("表A").GetComboListString("颜色", Filter)
End If
e.WriteString(vals)
此主题相关图片如下:0139.png