以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  求助:WEUI的问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=183149)

--  作者:晕了快扶我
--  发布时间:2022/10/26 6:46:00
--  求助:WEUI的问题
刚学WEUI,困扰了几天了,求大神解答
With wb.AddGrid("page1", "g1")
    .Add("c1", "服务费明细", "./images/理财_financing-one.png", "fwfcx.htm")
End with

我想点C1的时候,fwfcx.htm这个页面显示在page1里,而不是直接跳个新页面,该怎么写代码啊
[此贴子已经被作者于2022/10/26 6:46:33编辑过]

--  作者:有点蓝
--  发布时间:2022/10/26 8:53:00
--  
Select Case e.Path
    Case "test.htm"
        Dim wb As New weui
        With wb.AddGrid("", "g1")
            .Add("c1", "服务费明细", "./images/button.png").Attribute="onclick=""hide(\'page2\');show(\'page1\')"""
            .Add("c2", "其它明细", "./images/cell.png").Attribute="onclick=""hide(\'page1\');show(\'page2\')"""
            
        End With
        wb.AddPage("", "page1") \'增加两个page
        wb.AddPage("", "page2", False) \'第二个
        
        wb.AddForm("page1", "form1", "test1.htm")
        With wb.AddInputGroup("form1", "ipg1", "登录")
            .AddInput("xm1", "明细1控件1", "text")
            .AddInput("pw1", "明细1控件2", "text")
        End With
        With wb.AddButtonGroup("form1", "btg1", True)
            .Add("btn1", "确定", "submit")
        End With
        
        wb.AddForm("page2", "form2", "test2.htm")
        With wb.AddInputGroup("form2", "ipg2", "登录")
            .AddInput("xm2", "明细2控件1", "text")
            .AddInput("pw2", "明细2控件2", "text")
        End With
        With wb.AddButtonGroup("form2", "btg2", True)
            .Add("btn2", "确定", "submit")
        End With
        
        e.WriteString(wb.Build) \'生成网页
    Case "test1.htm"
        e.WriteString("接收明细1数据")
    Case "test2.htm"
        e.WriteString("接收明细2数据")
End Select
[此贴子已经被作者于2022/10/26 14:15:57编辑过]

--  作者:晕了快扶我
--  发布时间:2022/10/26 12:53:00
--  
感谢蓝版,可能我没说明白,这个代码我测试了,没有我想要的效果
我把完整的代码贴出来吧

Dim e As RequestEventArgs = args(0)
Dim wb As New weui
Dim nm As String = e.Cookies("username")
Dim dr As DataRow = DataTables("用户表").SQLFind("姓名 =\'" & nm & "\'")
wb.AddPageTitle("", "pageheader", "查询管理系统", "你好," & nm & "!我是你的小助理")
With wb.AddTabBar("", "tb1", 0)
    .AddPage("page1", "收入", "./images/金融_finance.png")
    .AddPage("page2", "支出", "./images/消费_consume.png")
    .AddPage("page3", "工作台", "./images/通讯录_address-book.png")
    .AddButton("bt1", "退出", "./images/退出文件夹_folder-withdrawal.png", "exit.htm")
End With
With wb.AddGrid("page1", "g1")
    .Add("c1", "服务费明细", "./images/理财_financing-one.png", "fwfcx.htm")
    .Add("c2", "订房查询", "./images/文档搜索_doc-search.png", "http://www.foxtable.com")
End With
With wb.AddGrid("page2", "g2")
    .Add("c6", "违规乐捐查询", "./images/惊讶_surprised-face-with-open-mouth.png")
    .Add("c8", "乐捐统计", "./images/分析_analysis.png", "http://www.foxtable.com")
End With


这个是主页的页面,我在TabBar的增加了三个4个page,又分别在page里加了若干多个Grid,我希望的效果是
当点击其中一个grid的时候,新的网页是出现在父级容器page里的,比如
 .Add("c1", "服务费明细", "./images/理财_financing-one.png", "fwfcx.htm")
这个C1的父级容器就是在
.AddPage("page1", "收入", "./images/金融_finance.png")
page1里

我希望fwfcx.htm这个页面出现在Pag1里,不然太难受了,老大辛苦再指导一下

--  作者:有点蓝
--  发布时间:2022/10/26 13:37:00
--  
在page1里再嵌套page即可,用法参考2楼,也就是相当于把2楼的用法在放入一个page里而已
--  作者:晕了快扶我
--  发布时间:2022/10/26 14:05:00
--  
以下是引用有点蓝在2022/10/26 13:37:00的发言:
在page1里再嵌套page即可,用法参考2楼,也就是相当于把2楼的用法在放入一个page里而已
老大,我还是没看明白,你可以帮我按我的代码写一下吗?麻烦了~~谢谢


--  作者:有点蓝
--  发布时间:2022/10/26 14:16:00
--  
……
End With
With wb.AddGrid("page1", "g1")
    .Add("c1", "服务费明细", "./images/理财_financing-one.png").Attribute="onclick=""hide(\'page12\');show(\'page11\')"""
    .Add("c2", "订房查询", "./images/文档搜索_doc-search.png").Attribute="onclick=""hide(\'page11\');show(\'page21\')"""
End With
        wb.AddPage("page1", "page11") \'增加两个page
        wb.AddPage("page1", "page12", False) \'第二个
\'把fwfcx.htm页面的内容放进来,比如
wb.AddForm("page11", "form1", "fwfcx.htm")
……其它fwfcx.htm页面的内容
With wb.AddGrid("page2", "g2")
    .Add("c6", "违规乐捐查询", "./images/惊讶_surprised-face-with-open-mouth.png")
    .Add("c8", "乐捐统计", "./images/分析_analysis.png", "http://www.foxtable.com")
End With