参考代码,自己写成js函数调用
Select Case e.Path
Case "test.htm",""
Dim wb As New weui
wb.AddForm("","form1","test.htm")
With wb.AddInputGroup("form1","ipg1","基本资料")
.AddInput("xm","姓名","text")
.AddInput("nl","年龄","number")
.AddInput("rq","日期","date")
.AddSwitch("vip","VIP客户")
End With
With wb.AddInputGroup("form1","ipg2","备注")
.AddTextArea("bz",5).Placeholder = "请输入200字以内的备注"
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "button").Attribute = ""
End With
wb.AppendHTML("<script>var height = document.body.clientHeight;window.addEventListener('resize', function () {var cheight = document.body.clientHeight; if(height == cheight) {bz.value='键盘收起了'}else{bz.value='键盘弹起了'};});</script>")
e.WriteString(wb.Build) '生成网页
End Select