如何验证多个子类别的复选框? [英] how to validate checkbox with multiple sub categories?

查看:57
本文介绍了如何验证多个子类别的复选框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

如何使用多个子类别验证复选框?



看到这个演示......

http://jsfiddle.net/B2nmy/13/ [ ^ ]



我需要点击Tamilnadu的结果那么印度和世界将被检查..

如果我宣布india为class = parent然后当我点击美国时,印度也检查了但是它错了。那么如何重写代码才能得到我需要的结果?



请帮助我..

提前谢谢..

Hello all,
how to validate checkbox using multiple sub categories?

see this demo...
http://jsfiddle.net/B2nmy/13/[^]

I need a result of when i click Tamilnadu then India and world will be checked..
if i declare india as class=parent then when i click america, india also checked but it was wrong. So how can i rewrite the code to get my needed result?

Kindly help me..
Thanks in advance..

推荐答案

请看我对这个问题的评论。



现在,当我还不知道你的目标时,试着问自己一个问题:代表国家的复选框不应该是单选按钮吗?



-SA
Please see my comment to the question.

For now, when I still don't know your goal, try to ask yourself one question: shouldn't the check boxes representing countries be radio buttons?

—SA


这篇关于如何验证多个子类别的复选框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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