Foxtable(狐表)用户栏目专家坐堂 → 侧边栏如何实现点击导航按钮后 将zhedie.htm这个页面加载进page2呢?


  共有3652人关注过本帖树形打印复制链接

主题:侧边栏如何实现点击导航按钮后 将zhedie.htm这个页面加载进page2呢?

帅哥哟,离线,有人找我吗?
cnsjroom
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1571 积分:11238 威望:0 精华:0 注册:2021/1/17 17:06:00
侧边栏如何实现点击导航按钮后 将zhedie.htm这个页面加载进page2呢?  发帖心情 Post By:2021/5/22 1:14:00 [只看该作者]

  1. Dim wb As New weui  
  2.         wb.AppendHTML("<link rel='stylesheet' href='./weui/exweui.css'/>",True
  3.         wb.AppendHTML("<script src='./weui/exweui.js' ></script>",True
  4.         With wb.AddTabBar("""tb1", 1)  
  5.             .AddPage("page1","侧栏","./images/cell.png").Attribute = "style='height: 100%;'"  
  6.             .AddPage("page2","导航","./images/tab.png")  
  7.         End With  
  8.         Dim tab As ExWeUI.ExSideTab = ExWeUI.WebUI.AddSideTab("","stab1")  
  9.         tab.AddPage("st1","单选框","getExRadioGroup","./images/button.png",True)  
  10.         tab.AddPage("st2","复选框","getExCheckGroup","./images/toast.png")  
  11.         tab.AddPage("st3","空白页面","")  
  12.         wb.InsertHTML("page1",tab.BuildHtml)  
  13.         wb.AppendHTML("<script>initExWeUI();</script>")  
  14.         e.WriteString(wb.Build)  
如何实现点击导航按钮后  将zhedie.htm这个页面加载进page2呢?

图片点击可在新窗口打开查看此主题相关图片如下:动画111.gif
图片点击可在新窗口打开查看


 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111427 积分:567211 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/5/22 10:40:00 [只看该作者]

Select Case e.Path
    Case "test.htm"
        Dim wb As New WeUI
        '增加三个页面,一个按钮
        With wb.AddTabBar("", "tb1", 1)
            .AddPage("page1","微信","./images/button.png")
            .AddPage("page2","通讯录","./images/msg.png").Attribute = "abc='alert(0)'"
            .AddPage("page3","发现","./images/article.png")
        End With
        '为第一个页面增加内容
        wb.AddForm("page1","form1","test.htm")
        With wb.AddInputGroup("form1","ipg1")
            .AddInput("xm","户名","text")
            .AddInput("mm","密码","password")
        End With
        With wb.AddButtonGroup("form1","btg1",True)
            .Add("btn1", "确定", "submit")
        End With
        wb.InsertHTML("page2","<div id='divpage1' />")
        wb.AppendHTML("<script>document.getElementById('page2_btn').addEventListener('click',function(){document.getElementById('divpage1').innerHTML=sendAjaxText('zhedie','zhedie.htm','',false);},false);</script>")
        e.WriteString(wb.Build)
    Case "zhedie.htm"
        Dim wb As New weui
        wb.AddForm("","form1","test.htm")
        With wb.AddRadioGroup("form1","rdg1","浏览器")
            .Add("bw1","Intenet Explorer")
            .Add("bw2","Google Chorme", True) '默认勾选
            .Add("bm3","FireFox")
            .Add("bm4","Safari").Enabled = False '此项不可选
        End With
        With wb.AddButtonGroup("form1","btg1",True)
            .Add("btn1", "确定", "submit")
        End With
        e.WriteString(wb.BuildHTML("form1")) '生成网页
End Select

 回到顶部
帅哥哟,离线,有人找我吗?
cnsjroom
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1571 积分:11238 威望:0 精华:0 注册:2021/1/17 17:06:00
回复:(有点蓝)Select Case e.Path    Ca...  发帖心情 Post By:2021/5/22 17:29:00 [只看该作者]

谢谢老师   这个折叠面板  怎么实现点击其中一个面板 就只打开这个面板 然后另外的面板都全部关闭呢?
Dim e As RequestEventArgs = args(0)  
Dim wb As New weui  
wb.AppendHTML("<link rel='stylesheet' href='./exweui.css'/>",True)  
With ExWeUI.WebUI.AddCollapseGroup("","col01",False)  
    With .AddPanel("colp01","面板1","./images/button.png")  
        .Show = True  
        .C  
    End With  
    With .AddPanel("colp02","面板2","./images/tab.png")  
        .C  
    End With  
    With .AddPanel("colp03","加载页面")  
        .DataUrl = "teststep2.htm"  
    End With  
    wb.InsertHTML(.BuildHtml)  
End With  
wb.AppendHTML("<script src='./exweui.js' ></script>",true)  
e.WriteString(wb.Build)

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111427 积分:567211 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/5/22 17:40:00 [只看该作者]

帮助有说明,看帮助

 回到顶部
帅哥哟,离线,有人找我吗?
cnsjroom
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1571 积分:11238 威望:0 精华:0 注册:2021/1/17 17:06:00
回复:(有点蓝)帮助有说明,看帮助  发帖心情 Post By:2021/5/22 19:59:00 [只看该作者]

麻烦老师看看  为什么详情、宫格页面内容会显示在导航页面呢?

图片点击可在新窗口打开查看此主题相关图片如下:动画12.gif
图片点击可在新窗口打开查看


当前代码如下:


Dim e As RequestEventArgs = args(0)

Dim wb As New weui
wb.AppendHTML("<link rel='stylesheet' href='./weui/exweui.css'/>",True)
wb.AppendHTML("<script src='./weui/exweui.js' ></script>",True)
With wb.AddTabBar("", "tb1", 1)
    .AddPage("page1","侧栏","./images/cell.png").Attribute = "style='height: 100%;'"
    .AddPage("page2","导航","./images/tab.png").Attribute = "style='height: 100%;'"
    .AddPage("page3","详情","./images/tab.png").Attribute = "style='height: 100%;'"
 .AddPage("page4","宫格","./images/tab.png").Attribute = "style='height: 100%;'"
End With

Dim tab As ExWeUI.ExSideTab = ExWeUI.WebUI.AddSideTab("","stab1")
tab.AddPage("st1","单选框","getExRadioGroup.htm","./images/button.png",True)
tab.AddPage("st2","复选框","getExCheckGroup.htm","./images/toast.png")
tab.AddPage("st3","空白页面","")
wb.InsertHTML("page1",tab.BuildHtml)
'wb.AppendHTML("<script>initExWeUI();</script>")

wb.InsertHTML("page2","<div id='divpage1' />")
wb.AppendHTML("<script>document.getElementById('page2_btn').addEventListener('click',function(){document.getElementById('divpage1').innerHTML=sendAjaxText('zhedie','zhedie.htm','',false);},false);</script>")

With wb.AddGrid("page4","ar5")
    For Each dr As DataRow In DataTables("基础资料表").sqlSelect("服务名称>''")
        .Add(dr("_Identify"),dr("服务名称"),"./images/toast.png",dr("ip"))
'MessageBox.Show(dr("_Identify"))
    Next
End With

wb.InsertHTML("page3","<div id='divpage2' />")
wb.AppendHTML("<script>document.getElementById('page3_btn').addEventListener('click',function(){document.getElementById('divpage2').innerHTML=sendAjaxText('yemian','yemian.htm','',false);},false);</script>")
wb.AppendHTML("<script>initExWeUI();</script>")
e.WriteString(wb.Build)



wb.AppendHTML("<script>initExWeUI();</script>")
e.WriteString(wb.Build)

[此贴子已经被作者于2021/5/22 20:29:35编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111427 积分:567211 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/5/23 20:51:00 [只看该作者]

wb.InsertHTML("page2","<div id='divpage1' />")

改为

wb.InsertHTML("page2","<div id='divpage1' ></div>")

 回到顶部
帅哥哟,离线,有人找我吗?
cnsjroom
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1571 积分:11238 威望:0 精华:0 注册:2021/1/17 17:06:00
回复:(有点蓝)wb.InsertHTML("page2","<div id=...  发帖心情 Post By:2021/5/23 22:30:00 [只看该作者]

谢谢老师  OK了

 回到顶部