输入标签名称属性中的方括号 [英] Square brackets in name attribute of input tag
本文介绍了输入标签名称属性中的方括号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我经常看到输入标签的name属性中有方括号.它有什么用,为什么要使用它?
I see a lot of time there is square brackets in the name attribute of input tag. What is it for and why it's used?
`input id="academy_name" name="academy[name]" size="30" type="text" />`
那为什么要用name ="academy [name]"而不是name ="academy".
So why name="academy[name]" and not just name="academy".
请帮助!
推荐答案
这是因为开发人员正在使用数组,因此他将名称包装在 []
大括号中
It is because the developer is using array, and hence he is wrapping the names in []
bar brackets
这篇关于输入标签名称属性中的方括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文