如何使用jQuery禁用单个fieldset行

问题描述 投票:-1回答:1

我可以在jQuery 3.3.1中显示和隐藏各个fieldset行,如下所示:

$("div.form-row.field-construction_start_date").show();
$("div.form-row.field-construction_start_date").hide();

但是,假设我要禁用单个字段集行以及该单行中的所有控件,如下所示:

$("div.form-row.field-construction_start_date").prop("disabled",true);

这是行不通的。任何人都可能对我做错了什么有所了解?

jquery
1个回答
0
投票
$("div.form-row.field-construction_start_date :input").prop("disabled",true);
© www.soinside.com 2019 - 2024. All rights reserved.