以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  我发现Post提交表单里的控件id会自动变小写,帮助文档里好像没说过这个啊  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=98095)

--  作者:chen3728060
--  发布时间:2017/3/23 23:24:00
--  我发现Post提交表单里的控件id会自动变小写,帮助文档里好像没说过这个啊

今天折腾了一个小时获取这个信息

        

          With wb.AddInputGroup("form1","ipg1")
            .AddInput("Account","户名","text")
            .AddInput("Password",
"
密码","password")
        End With

 

然后

        If e.PostValues.ContainsKey("Account") AndAlso e.PostValues.ContainsKey("Password"Then 

            messagebox.show(1)

        End If

 

总是获取不到

后来我发现,这个传递过去的Input控件的ID不是Account了,而是account了

 

        If e.PostValues.ContainsKey("account") AndAlso e.PostValues.ContainsKey("password"Then 
            messagebox.show(1)

        End If

这样就行了。

 

然后我发现帮助文档的参考代码里那些Weui控件都用小写做ID。

 

我只记得说过JS要严格区分大小写,没听说大小写的控件ID会自动变小写



--  作者:有点色
--  发布时间:2017/3/23 23:34:00
--  

AddInput(ID, Label, type)

ID 输入框ID,注意生成网页时,WeUI会自动将所有ID转换为小写,例如"Table1"或转换为"table1",今后不再重复提示,大家请自行留意。

 

http://www.foxtable.com/mobilehelp/scr/0045.htm

 

嗯嗯,是会转小写的。