[英].prop("disabled", true); ,prop("disabled", 'disabled'); and .attr('disabled', 'disabled') is not working in chrome
I have following and trying to disable the radio buttons, its not working in chrome but works in IE我已经关注并尝试禁用单选按钮,它在 chrome 中不起作用,但在 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);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.