输入标签名称属性中的方括号

编程入门 行业动态 更新时间:2024-10-12 08:26:01
本文介绍了输入标签名称属性中的方括号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我经常看到输入标签的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

更多推荐

输入标签名称属性中的方括号

本文发布于:2023-10-24 20:59:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1524989.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方括号   属性   名称   标签

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!