以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- exweui 标签 动态合成请教 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=174948) |
||||
-- 作者:yifan3429 -- 发布时间:2022/2/12 19:06:00 -- exweui 标签 动态合成请教 Dim wb As New weui wb.AddPageTitle("","ph1","CITY-W","为CITY-W用户量身设计") wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True) wb.AppendHTML("<script src=\'./weui/exweui.js\' ></script>",True) With ExWeUI.WebUI.AddTabsGroup("","tg01",True) Dim Names As String() = {"易格","优客","木作1","木作2","木作3","木作4","木作5","木作6","木作7","木作8","木作9","木作10","木作11","木作12" } For Each Name As String In Names With .AddPage("tab01",Name) \'With ExWeUI.WebUI.AddListGroup("","lst01",4) \'\'For Each r As DataRow In DataTables("图库").SqlSelect("[系列] = \'" & name & "\'", "","文件名 Desc") \'For Each r As DataRow In DataTables("图库").DataRows \'With .AddList(r("文件名"),"http://yifan9108.oicp.net/city-pic$/pic/" & r("文件名")) \'End With \'Next \'wb.InsertHTML(.BuildHtml) \'End With 希望 按下不同标签显示不同的内容,动态生成网页内容 End With Next wb.InsertHTML(.BuildHtml) End With wb.AppendHTML("<script>initExWeUI()</script>") \'用于初始化可滚动标签的宽度,如果没有设置可滚动标签,可以不用调用此函数 e.WriteString(wb.Build)
[此贴子已经被作者于2022/2/12 19:49:29编辑过]
|
||||
-- 作者:有点蓝 -- 发布时间:2022/2/13 20:17:00 -- With .AddPage("tab01",Name) .DataUrl = "http://yifan9108.oicp.net/city-pic$/pic/" & r("文件名") \'绑定显示其它页面 End With |
||||
-- 作者:yifan3429 -- 发布时间:2022/2/13 23:54:00 -- Dim wb As New weui \'wb.AddPageTitle("","ph1","CITY-W","为CITY-W用户量身设计") wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True) wb.AppendHTML("<script src=\'./weui/exweui.js\' ></script>",True) With ExWeUI.WebUI.AddTabsGroup("","tg01",True) \'With .AddPage("tab014","优客") \'.DataUrl = "优客.htm" \'绑定显示其它页面 \'End With 实现上面的功能,动态合成,点击某个标签就打开对应的页面 Dim Names As String() = {"优客","易格","慕弗","木作4","木作5","木作6","木作7"} For Each Name As String In Names With .AddPage("tab01",Name) .DataUrl = Name & ".htm" \'绑定显示其它页面 这里怎么动态合成页面 目前除了第一个后面的点击没有动静。 End With Next wb.InsertHTML(.BuildHtml) End With wb.AppendHTML("<script>initExWeUI()</script>") \'用于初始化可滚动标签的宽度,如果没有设置可滚动标签,可以不用调用此函数 e.WriteString(wb.Build)
[此贴子已经被作者于2022/2/13 23:58:14编辑过]
|
||||
-- 作者:有点蓝 -- 发布时间:2022/2/14 8:37:00 -- 点击没有动静说明不存在这些页面 |
||||
-- 作者:yifan3429 -- 发布时间:2022/2/14 23:48:00 -- Select Case e.Path Case "2111.htm" wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True) wb.AppendHTML("<script src=\'./weui/exweui.js\' ></script>",True) With ExWeUI.WebUI.AddTabsGroup("","tg01",True) With .AddPage("tab012","首页") .C End With Dim Names As List(Of String) Names = DataTables("网页_导航").GetValues("标题","[分类]= \'城市之窗品牌 \'","") For i As Integer = 0 To Names.Count -1 With .AddPage("tab01",Names(i)) .DataUrl = Names(i) & ".htm" \'绑定显示其它页面 \'\'.Content = Names(i) End With Next wb.InsertHTML(.BuildHtml) End With wb.AppendHTML("<script>initExWeUI()</script>") \'用于初始化可滚动标签的宽度,如果没有设置可滚动标签,可以不用调用此函数 e.WriteString(wb.Build) End Select 只有第一项会有条件显示,后面的都不能产生链接。老师帮忙看看。 地址 每个子项都是有效的
[此贴子已经被作者于2022/2/14 23:49:09编辑过]
|
||||
-- 作者:有点蓝 -- 发布时间:2022/2/15 8:36:00 -- 学会使用开发者工具调试网页呀,一目了然 正确的地址是 错误的
|
||||
-- 作者:yifan3429 -- 发布时间:2022/2/15 13:43:00 -- Names = DataTables("网页_导航").GetValues("标题","[分类]= \'城市之窗品牌 \'","") For i As Integer = 0 To Names.Count -1 With .AddPage("tab01",Names(i)) .DataUrl = Names(i) & ".html" \'绑定显示其它页面 \'\'.Content = Names(i) End With Next wb.InsertHTML(.BuildHtml) 感觉是不是这个合成有问题,还是只能显示第一页
|
||||
-- 作者:有点蓝 -- 发布时间:2022/2/15 14:01:00 -- 请上传实例说明 |
||||
-- 作者:yifan3429 -- 发布时间:2022/2/15 14:22:00 -- 动态标签测试 换成了文字测试
Dim e As RequestEventArgs = args(0) Dim wb As New weui Select Case e.Path Case "2111.html" wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True) wb.AppendHTML("<script src=\'./weui/exweui.js\' ></script>",True) With ExWeUI.WebUI.AddTabsGroup("","tg01",True) With .AddPage("tab012","首页") .C End With Dim Names As List(Of String) Names = DataTables("http").GetValues("function","[分类]= \'按客户分类\'","") For i As Integer = 0 To Names.Count -1 With .AddPage("tab01",Names(i)) \'.DataUrl = Names(i) & ".html" \'绑定显示其它页面 .Content = Names(i) & "<p style=\'padding:5px\'> 您好!很开心能认识优秀的您! </p>" End With Next wb.InsertHTML(.BuildHtml) End With wb.AppendHTML("<script>initExWeUI()</script>") \'用于初始化可滚动标签的宽度,如果没有设置可滚动标签,可以不用调用此函数 e.WriteString(wb.Build) End Select
[此贴子已经被作者于2022/2/15 14:45:09编辑过]
|
||||
-- 作者:有点蓝 -- 发布时间:2022/2/15 14:40:00 -- 没看懂这些代码。怎么测试?打开哪个网页? |