以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- AddTabBar 页面增加函数问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=191887) |
-- 作者:ycs5801 -- 发布时间:2024/5/13 22:03:00 -- AddTabBar 页面增加函数问题 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 这个能不能将page1、page2等页面设置成函数形式?应该怎样修改?
|
-- 作者:有点蓝 -- 发布时间:2024/5/13 22:09:00 -- http://www.foxtable.com/mobilehelp/topics/0081.htm 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 \'为第一个页面增加内容 Functions.Execute("函数1", wb) \'为第二个页面增加内容 Functions.Execute("函数2", wb) \'为第三个页面增加内容 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 e.WriteString(wb.Build) End Select 函数1 Dim wb As WeUI = args(0) 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 函数2 Dim wb As WeUI = args(0) 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 |
-- 作者:ycs5801 -- 发布时间:2024/5/14 8:40:00 -- 假如函数1的内容如下:Dim e As RequestEventArgs = args(0) Dim wb As WeUI = args(0) If e.Cookies.ContainsKey("用户姓名") And e.Cookies.ContainsKey("用户密码") Then Dim dr As DataRow = DataTables("登录用户").sqlfind("用户姓名=\'" & e.Cookies("用户姓名") & "\'") If dr Is Nothing OrElse dr("用户密码") <> e.Cookies("用户密码") Then \'\'\'如果无此用户,或密码不正确. wb.InsertHTML("<meta http-equiv=\'Refresh\' c>") e.WriteString(wb.Build) Return"" End If Else wb.InsertHTML("<meta http-equiv=\'Refresh\' c>") e.WriteString(wb.Build) Return"" End If 我如果去掉黄色部分,则会提示缺少e参数,如果用了就会报错:无法将类型为“Foxtable.wui”的对象强制转换为类型“Foxtable.RequestEventArgs”。
|
-- 作者:ycs5801 -- 发布时间:2024/5/14 8:53:00 -- Dim e As RequestEventArgs = args(1) Dim wb As WeUI = args(0) 这样改可以了。
|