以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 没有用表格组件,怎么传递主键参数? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=169779) |
-- 作者:有点蓝 -- 发布时间:2021/6/30 11:18:00 -- 添加一个js文件,假设名称:test.js,代码 function myshow(dlg,id) { var btn = document.getElementById("btnok"); btn.href = btn.href.split("?")[0] + "?id=" + id; show(dlg); } httprequest事件测试代码 Select Case e.Path Case "test.htm" Dim wb As New WeUI With wb.AddDialog("","dlg1", "提示","您的订单正在派送,请注意查收!") .AddButton("btnok","确定","edit.htm") End With Dim txt As String = "由各种物质组成的巨型球状天体,叫做星球.星球有一定的形状,有自己的运行轨道." dim r as row = tables("表A").rows(0) With wb.AddPanelGroup("","pg1","图文组合列表") With .Add("pn1","标题二",txt,"./images/search.png") \'带子链接 .AddFoot("文字来源1") .AddFoot("时间1") .AddFoot("<a onclick=""myshow(\'dlg1\',\'" & r("_Identify") & "\')"" style=\'color:blue\'>|其他信息1</a>","") End With r = tables("表A").rows(1) With .Add("pn2","标题二",txt,"./images/search.png") \'带子链接 .AddFoot("文字来源") .AddFoot("时间") .AddFoot("<a onclick=""myshow(\'dlg1\',\'" & r("_Identify") & "\')"" style=\'color:blue\'>|其他信息2</a>","") End With End With wb.AppendHTML("<script src=\'./test.js\'></script>") e.WriteString(wb.Build) \'生成网页 Case "edit.htm" e.WriteString(e.GetValues("id")) End Select |
-- 作者:有点蓝 -- 发布时间:2021/6/30 15:01:00 -- var btn = document.getElementById("btnok"); 输入框ID,注意生成网页时,WeUI会自动将所有ID转换为小写,例如"Table1"或转换为"table1",今后不再重复提示,大家请自行留意。
|