数据表如下
员工信息
编号 姓名 性别
1 张三 男
2 李四 男
3 王五 男
下面是教程源代码,现在得代码功能是级联传递,获取下一级的级联数据
求教,如何选择 编号 1 的时候 自动填写 编号 1 后面的 姓名 和 性别
- Select Case e.Path
- Case "test.htm"
- Dim wb As New weui
- wb.AppendHTML("<link rel='stylesheet' href='./weui/exweui.css'/>",True)
- wb.AppendHTML("<script src='./weui/exweui.js' ></script>",True)
- wb.AddForm("","form1","test.htm")
- With ExWeUI.WebUI.AddInputGroup("","ipg1","动态级联列表")
- With .AddQuerySelect("xh","型号","|" & DataTables("规格").GetComboListString("型号"))
- .Attribute = "string">"setAjaxQueryOptions('gg_list','getProducts.htm','xh',false)"""
- .Placeholder = "请选择型号"
- End With
- With .AddQuerySelect("gg","规格","")
- .Attribute = "string">"setAjaxQueryOptions('ys_list','getProducts.htm','xh','gg',false)"""
- .Placeholder = "先选择型号再选择规格"
- End With
- .AddQuerySelect("ys","颜色").Placeholder = "先选择型号规格再再选择颜色"
- wb.InsertHTML("form1",.BuildHtml)
- End With
- With wb.AddButtonGroup("form1","btg1",True)
- .Add("btn1", "确定", "submit")
- End With
- wb.AppendHTML("<script>initExWeUI();</script>")
- e.WriteString(wb.Build)
- Case "getProducts.htm"
- Dim vals As String
- If e.PostValues.Count = 1 Then
- vals = "|" & DataTables("规格").GetComboListString("规格","型号='" & e.PostValues("xh") & "'")
- ElseIf e.PostValues.Count = 2 Then
- Dim Filter As String = "型号='" & e.PostValues("xh") & "' And 规格='" & e.PostValues("gg") & "'"
- vals = "|" & DataTables("规格").GetComboListString("颜色", Filter)
- End If
- e.WriteString(vals)
- End Select