把扫描结果输入到“扫描”表中,代码如何写?
Dim e As RequestEventArgs = args(0)
Dim path = args(1)
Dim wb As new weui
wb.AppendHTML("<script type='text/javascript' src='/" & path & "/js/common.js'></script>", True)
wb.AppendHTML("<link rel='stylesheet' href='/" & path & "/css/common.css' Type='text/css' charset='utf-8'/>", True)
wb.AddForm("","form1","scan1")
With wb.AddInputGroup("form1","ipg1","测试")
.AddInput("姓名","姓名","Text")
.AddInput("年龄","年龄","number")
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "扫一扫", "button").Attribute = " & path & "/plus/barcode_scan.html',true,true);"""
End With
wb.InsertHTML("<script>function scaned( t, r, f ) {document.getElementById('姓名').value=r;}</script>")
Dim r As Row=Tables("扫描").addnew()
MessageBox.Show(e.PostValues("姓名"))
r("扫描")=e.PostValues("姓名")
Tables("扫描").save()
e.WriteString(wb.Build)