以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  关于 AddTabBar 如何直接跳转到第二个页面  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=115517)

--  作者:mmd888
--  发布时间:2018/3/8 15:05:00
--  关于 AddTabBar 如何直接跳转到第二个页面
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")
            .AddPage("page3","发现","./images/article.png")
            .AddButton("bt1","我","./images/cell.png","http://www.foxtable.com")
 End With

End select

用 AddTabBar 创建的页面,用外部链接如何直接跳到第二个页面?   假如每次跳转到test.htm 页面的时候都只能显示page1 的内容,能不能直接跳到page2呢?

--  作者:有点甜
--  发布时间:2018/3/8 15:36: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")
            .AddPage("page3","发现","./images/article.png")
            .AddButton("bt1","我","./images/cell.png","http://www.foxtable.com")
        End With
        wb.InsertHTML("<script>alert(3);document.getElementById(\'page1\').style.display=\'none\';document.getElementById(\'page2\').style.display=\'block\';document.getElementById(\'page1_btn name=\').setAttribute(\'class\',\'weui_tabbar_item\');document.getElementById(\'page2_btn name=\').setAttribute(\'class\',\'weui_tabbar_item weui_bar_item_on\');alert(4);</script>")
       
        e.WriteString(wb.Build)
End Select

--  作者:mmd888
--  发布时间:2018/3/8 15:56:00
--  
老师 这个还是没有看懂,能说明一下吗?


--  作者:有点甜
--  发布时间:2018/3/8 17:24:00
--  

page1隐藏,page2显示,page1按钮隐藏,page2按钮显示

 

wb.InsertHTML("<script>document.getElementById(\'page1\').style.display=\'none\';document.getElementById(\'page2\').style.display=\'block\';document.getElementById(\'page1_btn name=\').setAttribute(\'class\',\'weui_tabbar_item\');document.getElementById(\'page2_btn name=\').setAttribute(\'class\',\'weui_tabbar_item weui_bar_item_on\');</script>")