以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 侧边栏如何实现点击导航按钮后 将zhedie.htm这个页面加载进page2呢? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=166530) |
-- 作者:cnsjroom -- 发布时间:2021/5/22 1:14:00 -- 侧边栏如何实现点击导航按钮后 将zhedie.htm这个页面加载进page2呢?
如何实现点击导航按钮后 将zhedie.htm这个页面加载进page2呢? |
-- 作者:有点蓝 -- 发布时间: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 -- 发布时间:2021/5/22 17:29:00 -- 回复:(有点蓝)Select Case e.Path Ca... 谢谢老师 这个折叠面板 怎么实现点击其中一个面板 就只打开这个面板 然后另外的面板都全部关闭呢? 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) |
-- 作者:有点蓝 -- 发布时间:2021/5/22 17:40:00 -- 帮助有说明,看帮助 |
-- 作者:cnsjroom -- 发布时间:2021/5/22 19:59:00 -- 回复:(有点蓝)帮助有说明,看帮助 麻烦老师看看 为什么详情、宫格页面内容会显示在导航页面呢? 当前代码如下: 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编辑过]
|
-- 作者:有点蓝 -- 发布时间:2021/5/23 20:51:00 -- wb.InsertHTML("page2","<div id=\'divpage1\' />") 改为 wb.InsertHTML("page2","<div id=\'divpage1\' ></div>")
|
-- 作者:cnsjroom -- 发布时间:2021/5/23 22:30:00 -- 回复:(有点蓝)wb.InsertHTML("page2","<div id=... 谢谢老师 OK了 |