以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 移动开发中,如何长按AddArticle中AddContent内容,弹出菜单并实现该条内容编辑? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=100690) |
-- 作者:苍风霁月 -- 发布时间:2017/5/16 15:30:00 -- 移动开发中,如何长按AddArticle中AddContent内容,弹出菜单并实现该条内容编辑? 求原理、代码或案例!谢谢! [此贴子已经被作者于2017/5/16 15:33:09编辑过]
|
-- 作者:苍风霁月 -- 发布时间:2017/5/16 15:36:00 -- 看到案例,好像还是不行,使用菜单ActionSheet不能传值样? [此贴子已经被作者于2017/5/16 15:38:06编辑过]
|
-- 作者:有点蓝 -- 发布时间:2017/5/16 17:23:00 -- 引入js文件:test.js function getcontent(id,menu){ document.getElementById("curname").value = id;
show(menu); } HttpRequest测试代码: Dim fl As String = "d:\\web\\" & e.path If filesys.FileExists(fl) Dim idx As Integer = fl.LastIndexOf(".") Dim ext As String = fl.SubString(idx) Select Case ext Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar" e.WriteFile(fl) Return \'这里必须返回 End Select End If Select Case e.Path Case "test.htm" Dim wb As New WeUI wb.AppendHTML("<script src=\'./lib/test.js\'></script>") With wb.AddInputGroup("","ipg1","") .AddHiddenValue("curname","") End With With wb.AddArticle("","ar1") .AddTitle("h1","大标题") .AddTitle("h2","章标题") .AddTitle("h3","1.1节标题") .AddContent("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute","id=\'p1\' onclick=""getcontent(\'p1\',\'s1\')""") .AddImage("./images/001.jpg") .AddTitle("h3","1.2节标题") .AddContent("Foxtable将Excel?Access?Foxpro?VB以及易表的优势融合在一起,无论是数据录入?查询?统计,还是报表生成,都前所未有的强大和易用,普通用户无需编写任何代码,即可轻松完成复杂的数据管理工作,真正做到拿来即用.","id=\'p2\' onclick=""getcontent(\'p2\',\'s1\')""") .AddImage("./images/002.jpg") End With With wb.AddActionSheet("","s1") .Add("menu2", "菜单项目2") .Add("menu3", "菜单项目3").Attribute = "onclick=\'alert(document.getElementById(document.getElementById(""curname"").value).innerHTML)\'" .Add("menu4","取消","",True) End With e.WriteString(wb.Build) \'生成网页 End Select [此贴子已经被作者于2017/5/16 17:23:35编辑过]
|
-- 作者:苍风霁月 -- 发布时间:2017/5/17 8:58:00 -- 明白了,谢谢! |