gpt4 book ai didi

javascript - 使用 JQuery 根据值选择列表中的输入

转载 作者:太空宇宙 更新时间:2023-11-04 14:40:10 24 4
gpt4 key购买 nike

我有以下列表

enter image description here

我需要禁用具有特定值的单选按钮我怎样才能使用 JQuery 做到这一点

最佳答案

尝试以下操作:

$(":radio[value=15]").prop('disabled', 'disabled');

将“attr”编辑为“prop”方法,感谢 Ashraf Bashir

更新

如果您只想在“ulTeams”中为单选按钮使用 jquery 选择器,请使用以下选择器:

$("#ulTeams :radio[value=15]").prop('disabled', 'disabled');

see @ jsFiddle

关于javascript - 使用 JQuery 根据值选择列表中的输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18230853/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com