以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 浏览器提示:已添加了具有相同键的项。 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=97061) |
-- 作者:zhangjian222200 -- 发布时间:2017/3/5 14:16:00 -- 浏览器提示:已添加了具有相同键的项。 浏览器提示:已添加了具有相同键的项。 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("","form" & i,"test.htm") With wb.AddInputGroup("form1","ipg1") .AddInput("xm" & i,"年龄","text") .AddInput("pw" & i,"城市","text") End With With wb.AddButtonGroup("form" & i,"btg1",False) .Add("btn1" & i, "确定", "submit") .Add("btn12" & i, "确定", "submit") End With Next e.WriteString(wb.Build) \'生成网页 End Select
|
-- 作者:狐狸爸爸 -- 发布时间:2017/3/5 17:13:00 -- With wb.AddInputGroup("form1","ipg1") 改为: With wb.AddInputGroup("form" & i,"ipg1")
|
-- 作者:zhangjian222200 -- 发布时间:2017/3/5 20:00:00 -- 修改后,依然提示:已添加了具有相同键的项。 代码内共3组with语句,我试了下,当只留下1个(即注释其中2个),依然提示:已添加了具有相同键的项。是不是for语句的原因呢?
|
-- 作者:有点色 -- 发布时间:2017/3/5 21:00:00 -- Select Case e.Path Case "test.htm" Dim wb As New weui For i As Integer = 1 To 5 With wb.AddArticle("","ar" & i) .AddImage("./images/00" & i & ".jpg") End With wb.AddForm("","form" & i,"test.htm") With wb.AddInputGroup("form" & i,"ipg" & i) .AddInput("xm" & i,"年龄","text") .AddInput("pw" & i,"城市","text") End With With wb.AddButtonGroup("form" & i,"btg" & i,False) .Add("btn1" & i, "确定", "submit") .Add("btn12" & i, "确定", "submit") End With Next e.WriteString(wb.Build) \'生成网页 End Select |
-- 作者:zhangjian222200 -- 发布时间:2017/3/5 21:56:00 -- 再问,如果前面已经加载了一部分内容,如果需要追载,可以吗? e.WriteString(wb.Build) \'生成网页,就不行了,因为这个是重新生成网页
|
-- 作者:有点色 -- 发布时间:2017/3/5 23:48:00 -- 参考
http://www.foxtable.com/mobilehelp/scr/0097.htm
|