<asp:RadioButtonList ID="radlDAYINBZ" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
</asp:RadioButtonList>
判断是否选中
if ($('input:radio[name="radlDAYINBZ"]:checked').val() == undefined) {
top.$.messager.alert('提示信息', '请选择【筛查类型】!', 'info');
return false;
}
if ($('input:radio[name="radlSHAICHAJG"]:checked').val() == undefined) {
top.$.messager.alert('提示信息', '请选择【筛查结果】!', 'info');
return false;
}
//禁用RadioButtonList
function setRadioButtonListJy() {
document.getElementById("radlT21_STSCJG").disabled = true;
document.getElementById("radlT18_STSCJG").disabled = true;
document.getElementById("radlT13_STSCJG").disabled = true;
document.getElementById("radlONTD_SCJG").disabled = true;
}
//启用RadioButtonList 根据条件;否则禁用并清空
function setRadioButtonListQy() {
if ($('#txtT21_RISK_GTL').val().length >= 1) {
document.getElementById("radlT21_STSCJG").disabled = false;
} else {
document.getElementById("radlT21_STSCJG").disabled = true;
for (var i = 1; i < document.all.radlT21_STSCJG.length; i++) {
document.all.radlT21_STSCJG[i].checked = false;
}
}
if ($('#txtT18_RISK_GTL').val().length >= 1) {
document.getElementById("radlT18_STSCJG").disabled = false;
} else {
document.getElementById("radlT18_STSCJG").disabled = true;
for (var i = 1; i < document.all.radlT18_STSCJG.length; i++) {
document.all.radlT18_STSCJG[i].checked = false;
}
}
if ($('#txtT13_RISK_GTL').val().length >= 1) {
document.getElementById("radlT13_STSCJG").disabled = false;
} else {
document.getElementById("radlT13_STSCJG").disabled = true;
for (var i = 1; i < document.all.radlT13_STSCJG.length; i++) {
document.all.radlT13_STSCJG[i].checked = false;
}
}
if ($('#txtNTD_RISK').val().length >= 1) {
document.getElementById("radlONTD_SCJG").disabled = false;
} else {
document.getElementById("radlONTD_SCJG").disabled = true;
for (var i = 1; i < document.all.radlONTD_SCJG.length; i++) {
document.all.radlONTD_SCJG[i].checked = false;
}
}
}
标签:false,length,JS,disabled,getElementById,STSCJG,document From: https://blog.51cto.com/u_15999672/6110599