参考代码
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