以文本方式查看主题 - Foxtable(狐表) (http://www.foxtable.com/bbs/index.asp) -- 专家坐堂 (http://www.foxtable.com/bbs/list.asp?boardid=2) ---- 请教:单引号,双引号 (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=128004) |
-- 作者:bahamute -- 发布时间:2018/11/27 9:12:00 -- 请教:单引号,双引号 .AddImage("./HRlogsFiles/" & dr1("文件名")) 需要在Attribute 中加入 onclick 和 style ,就是无法通过编译,单引号,双引号搞的头晕目眩 特来请教,以下两行代码如何拼接到.AddImage 的 Attribute 中去? "o n c l i c k=""showGallery(\'gla1\',\'./HRlogsFiles/\' & dr1("文件名") & "\' )""" "style=\'margin: 0 auto;display: block;width:90%;height:90%;box-shadow: 10px 10px
10px rgba(0,0,0,.5);\'" [此贴子已经被作者于2018/11/27 9:45:00编辑过]
|
-- 作者:有点蓝 -- 发布时间:2018/11/27 11:25:00 -- .Attribute = " & dr1("文件名") & "\')"" style = \'margin: 0 auto;display: block;width:90%;height:90%;box-shadow: 10px 10px 10px rgba(0,0,0,.5);\'" |
-- 作者:有点甜 -- 发布时间:2018/11/27 11:46:00 -- "onclick=""showGallery(\'gla1\',\'./HRlogsFiles/" & dr1("文件名") & "\')"" style=\'margin: 0 auto;display: block;width:90%;height:90%;box-shadow: 10px 10px 10px rgba(0,0,0,.5);\'" |
-- 作者:bahamute -- 发布时间:2018/11/27 13:47:00 -- 还是出错: 编译错误:应为“)” .AddImage("./HRlogsFiles/" & dr1("文件名"),"o n c lick= ""showGallery(\'gla1\', "\'./HRlogsFiles/" & dr1("文件名") & "\') "" style=\'margin: 0 auto;display: block;width:90%;height:90%;box-shadow: 10px 10px 10px rgba(0,0,0,.5);\')" [此贴子已经被作者于2018/11/27 14:13:19编辑过]
|
-- 作者:有点甜 -- 发布时间:2018/11/27 15:12:00 -- Select Case e.Path Case "test.htm", "" Dim wb As new WeUI Dim file = "001.jpg" With wb.AddArticle("","ar1") .AddContent("Write your Sad Times in Sand, Write your Good Times in Stone.-- George Bernard Shaw") .AddImage("./images/001.jpg","onclick=""showGallery(\'gla1\',\'./images/" & file & "\')"" style=\'margin: 0 auto;display: block;width:90%;height:90%;box-shadow: 10px 10px 10px rgba(0,0,0,.5);\'") End With \'增加Gallery,第三个参数False表示初始隐藏,第四个参数True表示点击图片自动隐藏 With wb.AddGallery("","gla1",False,True) .AddImage("./images/001.jpg") End With e.WriteString(wb.Build) \'生成网页 End Select |