Foxtable(狐表)用户栏目专家坐堂 → AddSelect如何实现多选呢?当前已经解决了值的获取及单选,怎么实现多选呢?


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

主题:AddSelect如何实现多选呢?当前已经解决了值的获取及单选,怎么实现多选呢?

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/3/18 10:16:00 [显示全部帖子]

参考代码

 

Select Case e.Path
    Case "test.htm", ""
        Dim wb As New WeUI
        With wb.AddInputGroup("","ipg1","干警信息")
            .AddInput("姓名","姓名","Text").Attribute = "onclick=""show('dlg2')"""
        End With
        Dim wb2 As New weui
        wb2.AddForm("","form2","test.htm")
        Dim ary() As String = {"数据1", "数据2", "数据3"}
        With wb2.AddCheckGroup("form2","rdg1","浏览器")
            For i As Integer = 0 To ary.length-1
                .Add("bm" & i, ary(i))
            Next
        End With
        With wb.AddDialog("","dlg2", "请选择",wb2.Build)
            .AddButton("btnCancel","取消").Kind = 1
            Dim str As String = ""
            str &= "var s = '';"
            For i As Integer = 0 To ary.length-1
                str &= "var c" & i & " = document.getElementById('bm" & i & "').checked;"
                str &= "if(c" & i & "){s = s + '," & ary(i) & "'};"
            Next
            'str &= "alert(s.substring(1));"
            str &= "姓名.value = s.substring(1)"
            'msgbox(str)
            .AddButton("btnOK","确定").Attribute="onclick=""" & str & """"
        End With
        e.WriteString(wb.Build) '生成网页
End Select


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/3/19 11:24:00 [显示全部帖子]

以下是引用李孝春在2019/3/18 23:45:00的发言:
有点蓝老师有没有对应的weui模糊查询相关例子呢?

 

建议就用7楼的方法吧,7楼的显示形式不符合你的需求?

 


 回到顶部