以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 请各位老师指导下:当前页面中如何在输入电话号码之后,点击查询按钮,然后将查询到的结果显示在当前页面查询按钮之后呢? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=171546) |
-- 作者:cnsjroom -- 发布时间:2021/9/2 16:10:00 -- 请各位老师指导下:当前页面中如何在输入电话号码之后,点击查询按钮,然后将查询到的结果显示在当前页面查询按钮之后呢? 请各位老师指导下:当前页面中如何在输入电话号码之后,点击查询按钮,然后将查询到的结果显示在当前页面查询按钮之后呢? 当前页面代码如下: Dim e As RequestEventArgs = args(0) Dim wb As New weui wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True) wb.AddForm("","form1","shaixuan.htm") Dim ip As object With wb.AddInputGroup("form1","ipg1","资料查询") ip = .AddInput("bh","联系电话","text") End With With wb.AddButtonGroup("form1","btg1",False) .Add("btn1", "查询", "submit") .Add("btn3", "退出", "button","logon.htm") End With e.WriteString(wb.Build) Dim bh As String \'联系电话 Dim dr As DataRow \'当前数据 Dim name As String = e.Cookies("username") \'用户名 Dim cmd As new S QLCommand cmd.Connection Name = "智慧党建" cmd.Comm andText= "sel ect 线索描述,举报时间,备注 as 处理情况 From 线索举报 where 联系电话=\'" & bh & "\'" Dim dt As DataTable = cmd.Execu teReader If e.PostValues.ContainsKey("bh") Then \'如果包含编号,说明是点击了查询或者审核按钮 bh = e.PostValues("bh") MessageBox.Show(bh) dr = dt.sqlFind("联系电话=\'" & bh & "\'") \'查询是否有此编号数据 If dr IsNot Nothing Then \'如果有意见数据,说明是点击审核按钮进来的 MessageBox.Show("有数据") Else MessageBox.Show("没有数据") End If End If
|
-- 作者:有点蓝 -- 发布时间:2021/9/2 16:22:00 -- 参考这种,使用js处理:http://www.foxtable.com/mobilehelp/topics/0110.htm |
-- 作者:cnsjroom -- 发布时间:2021/9/2 20:48:00 -- 回复:(有点蓝)参考这种,使用js处理:http://www.f... js代码如下 function tongji(){ var result = submitAjaxForm(\'form1\',\'\',false); document.getElementById("p1").innerHTML=result; } Dim e As RequestEventArgs = args(0) Dim wb As New weui wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True) wb.AppendHTML("<script>" & vars("ajaxform") & "</script>") \'引入脚本文件 wb.AddForm("","form1","tongji.htm") Dim ip As object With wb.AddInputGroup("form1","ipg1","资料查询") ip = .AddInput("联系电话","联系电话","text") End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "统计", "button").).Attrib ute= "oncl ick= \'tongji()\'" End With wb.AppendHTML("<div id=\'p1\' style=\'margin:0.5em\'></div>") \'插入一个div,用于显示服务器返回的 页面 e.WriteString(wb.Build) tongji页面代码 Dim e As RequestEventArgs = args(0) Dim wb As New weui If e.PostValues.ContainsKey("联系电话") Then MessageBox.Show("1") Dim b As New CrossTableBuilder("统计表1",DataTables("线索举报")) wb.AddTable("","Table1").CreateFromDataTable(b.Build(True)) Else wb.InsertHTML("请按输入分组列和统计列!") End If e.WriteString(wb.Build) 运行会弹出提示内容1,但是不显示数据,麻烦老师帮忙指导下,谢谢。 需要从线索举报表中查找联系电话符合的线索描述 举报时间 处理情况 三个字段的值 [此贴子已经被作者于2021/9/2 20:57:18编辑过]
|
-- 作者:有点蓝 -- 发布时间:2021/9/2 21:15:00 -- tongji页面代码 Dim e As RequestEventArgs = args(0) Dim wb As New weui If e.PostValues.ContainsKey("联系电话") Then MessageBox.Show("1") wb.AddTable("","Table1").CreateFromDataTable(DataTables("线索举报"),true,"联系电话=\'" & e.PostValues("联系电话") & "\'") Else wb.InsertHTML("请按输入分组列和统计列!") End If e.WriteString(wb.Build) |