-- 如果扫描的结果是网页,如何登录到这个网页
如果扫描的结果是网页,如何登录到这个网页;如果不是网页,就把结果输入到“扫描结果”这个标签(下面代码已实现)
Dim e As RequestEventArgs = args(0)
Dim path = args(1)
wb = new weui
If e.PostValues("扫描结果")=Nothing
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",False)
.Add("btn1", "扫一扫", "button").Attribute = " & path & "/plus/barcode_scan.html\',true,true);"""
.Add("btn1", "确定", "submit")
End With
wb.InsertHTML("<script>function scaned( t, r, f ) {document.getElementById(\'扫描结果\').value=r;}</script>")
e.WriteString(wb.Build)
Else
Dim r As Row=Tables("扫描").addnew()
r("扫描")=e.PostValues("扫描结果")
Tables("扫描").save()
With wb.AddTable("","Table1")
\'按日期顺序列出客户CS01的订单,仅显示产品/数量/单价/日期/审核等五列
.CreateFromDataTable(DataTables("扫描"),True)
End With
e.WriteString(wb.Build)
End If