开启图片删除功能
如果将Uploader的AllowDelete属性设置为True,在图片浏览窗口的底部会出现一个删除按钮,单击这个按钮,可以删除正在浏览的图片。
HttpRequest事件代码:
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("年龄","年龄","number").Value
= "28"
.AddInput("日期","日期","date").value
= #10/12/2012#
With .AddUploader("up1","照片",True)
.AllowDelete =
True
'允许用户删除图片
.AddImage("./images/shuqi1.jpg")
.AddImage("./images/shuqi2.jpg")
.AddImage("./images/shuqi3.jpg")
End With
End
With
With
wb.AddButtonGroup("form1","btg1",True)
.Add("btn1",
"确定",
"submit")
End With
e.WriteString(wb.Build)
'生成网页
End
Select
这是通过手机访问的效果,当所有图片都被删除完毕时,图片浏览窗口会被自动关闭: