以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  js事件往表格添加行  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=99598)

--  作者:fubblyc
--  发布时间:2017/4/22 0:40:00
--  js事件往表格添加行

想实现 扫码枪扫一下(还没提交数据,先填入表格,再最后保存),就自动增加行,行的值等于文本框收到的条码的值


图片点击可在新窗口打开查看此主题相关图片如下:微信截图_20170422003304.png
图片点击可在新窗口打开查看

Dim wb As New weui
Selec t Case e.Path
    Case "addnew.htm"
        If e.PostValues.Count = 0 Then

            wb.AddForm("","form1","addnew.htm")
            With wb.AddInputGroup("form1","ipg1","扫一扫条形码,自动录入")
       
                With .AddInput("number","条形码","text")

                       .Attribute = ""  \'事件调用增加行,填入数据
                End With
                           
            End With            
            
            With wb.AddTable("","Table1")
                .CreateFromTable(Tables("明细"),True)
            End With

 

            e.WriteString(wb.Build) \'生成网页
                    
End Selec t

 

js文件增加行不知道怎么写:

function calc(){

dim dr as datarow = datatables("明细").addnew

dr("number") = number.value                           这样写是错的!!

 }

[此贴子已经被作者于2017/4/22 2:44:24编辑过]

--  作者:有点蓝
--  发布时间:2017/4/22 9:28:00
--  
参考:https://www.baidu.com/baidu?word=html%20table%20增加行&ie=utf-8&tn=maxco3_dg&ch=1