以下是扫码录入的代码,程序已经能成功扫码,并将扫到的内容输入到指定的位置,现在的问题是如果扫码扫到的内容是“生产原料-锦纶-导电锦纶-0123-20190102”,如何能把扫码得到的内容按“-”分隔开分别输入到位置,哪位老师给指导一下,
Dim fl As String = ProjectPath & "web\" & e.path
Dim path As String = "foxtableAppTest"
If filesys.FileExists(fl)
Dim idx As Integer =
fl.LastIndexOf(".")
Dim ext As String = fl.SubString(idx)
Select Case ext
Case
".jpg",".gif",".png",".bmp",".wmf",".js",".css"
,".html",".htm",".zip",".rar",".txt"
e.WriteFile(fl)
Return '这里必须返回
End Select
End If
Select Case e.path
Case "test.htm"
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","test.htm")
With
wb.AddInputGroup("form1","ipg1","测试")
.AddInput("姓名","姓名","Text")
.AddInput("年龄","年龄","number")
End With
With
wb.AddButtonGroup("form1","btg1",True)
.Add("btn1",
"扫一扫", "button").Attribute =
"web\"&"
& path & "/plus/barcode_scan.html',true,true);"""
End With
wb.InsertHTML("<script>function scaned( t, r, f ) {document.getElementById('原料货号').value=r;}</script>")
e.WriteString(wb.Build)
End Select