以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  微信网页打开页后如何默认显示第二页?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=157174)

--  作者:happyft
--  发布时间:2020/10/6 10:58:00
--  微信网页打开页后如何默认显示第二页?

如下面,打开某页时有几个页面,默认是显示的左边第一页即page1,当三个页面的内容都增加完成后,我想让第三页page3显示出来,

而不是显示第1页应该如何写代码?谢谢!


Select Case e.Path
    Case "test.htm"
        Dim wb As New WeUI
        Dim txt As String =
"
由各种物质组成的巨型球状天体,叫做星球.星球有一定的形状,有自己的运行轨道."
       
\'增加三个页面,一个按钮
       
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.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
        \'为第二个页面增加内容
        With wb.AddPanelGroup("page2","pg1","图文组合列表")
            .Add("pn1","标题一",txt,"./images/button.png","http://www.foxtable.com")
            With .Add("pn2","标题二",txt,"./images/search.png")
                .AddFoot("文字来源")
                .AddFoot("时间")
                .AddFoot("|其他信息","http://www.foxtable.com")
           
End With
            .GroupFoot =
"
查看更多"
            .GroupHref = "http://www.foxtable.com/"
        End With
       
\'
为第三个页面增加内容
        With wb.AddArticle("page3","ar1")
            .AddTitle("h1",
"
发现")
            .AddTitle("h2",
"
章标题")
            .AddTitle("h3",
"1.1
节标题")
            .AddContent(txt)
            .AddImage("./images/001.jpg")
            .AddTitle("h3",
"1.2
节标题")
            .AddContent(txt)
            .AddImage("./images/002.jpg")
        End With


这里应该如何写代码才能打开后显示第3页?


        e.WriteString(wb.Build)

End
Select


--  作者:有点蓝
--  发布时间:2020/10/6 11:05:00
--  
        wb.AppendHTML("<script>hide(\'page1\');show(\'page3\')</script>")  \'引入脚本文件
        e.WriteString(wb.Build) \'生成网页

--  作者:HappyFt
--  发布时间:2020/10/6 11:22:00
--  
但这样屏幕会闪烁一下,要如何才能控制不闪烁,谢谢!
--  作者:有点蓝
--  发布时间:2020/10/6 11:28:00
--  
仔细看看:http://www.foxtable.com/mobilehelp/topics/0109.htm