HTML复选框分组 [英] HTML Checkbox grouping

查看:124
本文介绍了HTML复选框分组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常,HTML复选框基于名称进行分组。是否可以对除名称之外的其他复选框进行分组?



谢谢!

解决方案>

不在HTML中。但是你可以在服务器端写一些代码逻辑,根据一些条件对它们进行分组。



但是,这只是笨拙。只是利用你给的好处HTML的能力,只用名称分组他们。如果你有一个问题,那么它需要被固定在其他地方,也许带有元素ID(表示文档树中的唯一性)或元素样式类(表示文档树中的常见含义)。


Normally HTML check boxes are grouped based on name. Is it possible to group check box other than name?

Thank You!

解决方案

Not in HTML. But you can write some code logic in the server side which groups them based on some condition, e.g. a common prefix or suffix in the parameter name or even parameter value.

However, that's only clumsy. Just profit the benefit HTML you gave with the ability to group them by just the name. If you have a problem with that, then it needs to be fixed somewhere else, maybe with the element ID (to denote uniqueness in the document tree) or the element style class (to denote a common meaning in the document tree).

这篇关于HTML复选框分组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆