以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  如何把扫描的数据输入到表中  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=118979)

--  作者:lihe60
--  发布时间:2018/5/15 13:39:00
--  如何把扫描的数据输入到表中
把扫描结果输入到“扫描”表中,代码如何写?

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)

--  作者:有点甜
--  发布时间:2018/5/15 14:18:00
--  

js里面,得到值以后,可以用ajax发到后台

 

http://www.foxtable.com/mobilehelp/scr/0108.htm

 

或者是直接提交表格

 

http://www.foxtable.com/mobilehelp/scr/0103.htm

 

http://www.foxtable.com/mobilehelp/scr/0101.htm