以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 移动开发PAGE切换问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=162180) |
-- 作者:tianhao0817 -- 发布时间:2021/4/8 9:38:00 -- 移动开发PAGE切换问题 我的PAGE1是列表,现在点击一行,进入page2,再点回来的时候,显示的是PAGE1的顶部, 我想要实现的就是,我page1滚动到哪个位置,切换回来还是哪个位置. 麻烦老师指点一下,谢谢 Dim e As RequestEventArgs = args(0) Select Case e.Path Case "t1.htm" Dim wb As New weui wb.AddPage("","page1") \'增加两个page wb.AddPage("","page2",False) \'第二个 With wb.AddListGroup("page1", "lsg1","简单列表") For i As Integer = 0 To 20 Dim s As String s="lg" & i .Add(s, "新浪主页" & i).Attribute=""" Next End With With wb.AddArticle("page2","ar2") .AddTitle("h1","关于易表") .AddContent("易表.net介于电子表格和数据库软件之间,它有类似电子表格的界面,同时又有很多数据库软件特有的功能和灵活性,它能将复杂的操作简单化,让普通用户轻松完成复杂的数据管理和统计分析工作.") .AddImage("./images/002.jpg") End With With wb.AddButtonGroup("page2","btg2") .Add("btn2", "上一页", "button").Attribute=""" End With e.WriteString(wb.Build) \'生成网页 End Select [此贴子已经被作者于2021/4/8 9:41:57编辑过]
|
-- 作者:有点蓝 -- 发布时间:2021/4/8 10:12:00 -- Select Case e.Path Case "test.htm" Dim wb As New weui wb.AppendHTML("<script>var cur;</script>",True) wb.AddPage("","page1") \'增加两个page wb.AddPage("","page2",False) \'第二个 With wb.AddListGroup("page1", "lsg1","简单列表") For i As Integer = 0 To 20 Dim s As String s="lg" & i .Add(s, "新浪主页" & i).Attribute="tabindex=\'1\' onclick=""cur=\'#" & s & "\';hide(\'page1\');show(\'page2\')""" Next End With With wb.AddArticle("page2","ar2") .AddTitle("h1","关于易表") .AddContent("易表.net介于电子表格和数据库软件之间,它有类似电子表格的界面,同时又有很多数据库软件特有的功能和灵活性,它能将复杂的操作简单化,让普通用户轻松完成复杂的数据管理和统计分析工作.") .AddImage("./images/002.jpg") End With With wb.AddButtonGroup("page2","btg2") .Add("btn2", "上一页", "button").Attribute="onclick=""hide(\'page2\');show(\'page1\');document.querySelector(cur).focus();""" End With e.WriteString(wb.Build) \'生成网页 End Select
|
-- 作者:tianhao0817 -- 发布时间:2021/4/8 10:16:00 -- 谢谢老师!和点击前稍后区别,不过能满足需求了 |