以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 手机扫码输入 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=136650) |
-- 作者:goe12345 -- 发布时间:2019/6/18 11:44:00 -- 手机扫码输入 Select Case e.path
Case "test.htm" Dim wb As new weui Dim scod As String 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","测试") With .AddInputCell("ic1") .AddLabel("lbh","资产编号",0) .AddInput("cod","text",1) .AddVcodeButton("scan","扫码输入",2).Attribute = " & path & "/plus/barcode_scan.html\',true,true);""" \'增加二维码扫描按钮,2表示显示在右边 End With .AddInput("员工姓名","员工姓名","Text") .AddInput("部门名称","部门名称","Text") .AddInput("资产名称","资产名称","Text") End With \' wb.InsertHTML("<script>Function scaned( t, r, f ) {plus.nativeUI.alert(\'扫描返回的信息如:\\n编码:\' + t + \'\\n内容:\' + r + \'\\n图片存放路径(在手机端):\' + f);}</script>") \' wb.InsertHTML("<script>function scaned( t, r, f ) {scod=r; }</script>") \'wb.InsertHTML("<script>Function scaned( t, r, f ){document.getElementById(\'cod\').value=r;}</script>") wb.InsertHTML("<script>function scaned( t, r, f ) {document.getElementById(\'cod\').value=r;}</script>") e.WriteString(wb.Build) End Select
为什么,我扫码后,会出现选择打开方式的提示,打开方式为手机中的不同浏览器,如下图 此主题相关图片如下:微信图片_20190618114058.jpg |
-- 作者:有点甜 -- 发布时间:2019/6/18 11:54:00 -- 你这种方式,需要打包成app才可以的,如
http://foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=106991&skin=0
|