我有以下复选框列表.输出列表的方式允许用户选择多个值.但是,我只需要允许用户从下面的复选框列表中选择一个值.
有可能用jQuery以某种方式实现这一点吗?将列表更改为单选按钮,选择列表或其他可能有用的内容也是可以的.
提前致谢
asdasd
最佳答案
$('.form-checkBox').bind('click',function() {
$('.form-checkBox').not(this).attr('checked',false);
});
已编辑以优化性能.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。