1、做个循环,重复写入代码中With块的代码就可以了
Select Case e.Path
Case "test.htm"
Dim wb As New weui
For i As Integer = 1 To 5
With wb.AddArticle("","ar1")
.AddImage("./images/00" & i & ".jpg")
End With
wb.AddForm("","form1","test.htm")
With wb.AddInputGroup("form1","ipg1")
.AddInput("xm" & i,"年龄","text")
.AddInput("pw" & i,"城市","text")
End With
With wb.AddButtonGroup("form1","btg1",False)
.Add("btn1" & i, "确定", "submit")
.Add("btn12" & i, "确定", "submit")
End With
Next
e.WriteString(wb.Build) '生成网页
End Select
2、直接拼接字符串,颜色需要使用html标签