I have following and trying to disable the radio buttons, its not working in chrome but works in IE
<div id="MBOption" class="col-lg-12" style="display:inline-block; align-content:center">
@*<input type="radio" name="MBOptn" id="DisMB" value="DisMB" checked />*@
@if (ViewBag.UserPref == true)
{
<input type="radio" name="MBOptn" id="DisMB" value="DisMB" onclick="DisplayMB();" checked />
<label for="DisMB">Display Medical Bills </label>
<input type="radio" name="MBOptn" id="NoMB" data-toggle="modal" data-target="#divMBDeleteModal" value="NoMB" onclick="NoMB();"/>
<label for="NoMB"> Do not display Medical Bills</label>
}
else
{
<input type="radio" name="MBOptn" id="DisMB" value="DisMB" onclick="DisplayMB();"/>
<label for="DisMB">Display Medical Bills </label>
<input type="radio" name="MBOptn" id="NoMB" data-toggle="modal" data-target="#divMBDeleteModal" value="NoMB" checked />
<label for="NoMB"> Do not display Medical Bills</label>
}
</div>
禁用输入,而不是父 div
$("#MBOption input").prop("disabled", true);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.