以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- weui动态浏览图片五张只显示一张。 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=136409) |
|
-- 作者:ifozhang -- 发布时间:2019/6/12 18:13:00 -- weui动态浏览图片五张只显示一张。 Dim dr As DataRow = DataTables("表1").DataRows(0) Dim Multi As String = dr("单据图片") Dim Values() As String Values = Multi.split(vbcrlf) Select Case e.Path Case "test.htm" Dim wb As New weui wb.AddForm("","form1","test.htm") With wb.AddInputGroup("form1","ipg1","客户资料") .AddInput("姓名","姓名","text").value = "舒淇" .AddInput("地点","地点","text").Value = "蒙古草原" .AddInput("日期","日期","date").value = #10/12/2012# With .AddUploader("up1","",True) .AllowAdd = False \'关闭文件上传功能 For Index As Integer = 0 To Values.Length - 1 .AddImage("./images/"&Values(Index)) Next End With End With e.WriteString(wb.Build) \'生成网页 End Select <!--StartFragment -->
五张图片测试只显示一张 [此贴子已经被作者于2019/6/12 18:14:29编辑过]
|
|
-- 作者:有点蓝 -- 发布时间:2019/6/13 8:41:00 -- 代码没有问题,或者试试 Dim dr As DataRow = DataTables("表1").DataRows(0) Dim Multi As List(of String) = dr.Lines("单据图片") Select Case e.Path Case "test.htm" Dim wb As New weui wb.AddForm("","form1","test.htm") With wb.AddInputGroup("form1","ipg1","客户资料") .AddInput("姓名","姓名","text").value = "舒淇" .AddInput("地点","地点","text").Value = "蒙古草原" .AddInput("日期","日期","date").value = #10/12/2012# With .AddUploader("up1","",True) .AllowAdd = False \'关闭文件上传功能 For Each file As String In Multi msgbox(file) .AddImage("./images/" & file ) Next End With End With e.WriteString(wb.Build) \'生成网页 End Select |
|
-- 作者:有点甜 -- 发布时间:2019/6/13 8:47:00 -- Values = Multi.split(vbcrlf)
改成
Values = Multi.replace(chr(10), "").split(chr(13)) |
|
-- 作者:ifozhang -- 发布时间:2019/6/13 10:16:00 -- 两种方法均可以,多谢两位! |