且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

方括号中的HTML表单数组。只是传统​​的或与意义?

更新时间:2023-02-18 15:45:34

他们解决PHP的限制,不产生一个数组,如果自动与多个同名的值被提交,例如从一组复选框或多选。 (IIRC它只返回最后一个值。)

They address a limitation of PHP, which doesn't generate an array automatically if multiple values with the same name are submitted, for example from a set of checkboxes or a multiple select. (IIRC it only returns the last value.)

我个人一直认为它是一个pretty以次充好的解决方法。即使是经典ASP可以与应付,无需客户端增加的标记。服务器端平台没有经营这种方式在客户端上施加标记的要求。

Personally I've always thought it to be a pretty shoddy workaround. Even Classic ASP could cope with that without requiring client-side additions to markup. The server-side platform has no business imposing markup requirements on the client in this way.