当前位置: 代码迷 >> 综合 >> asp:RadioButtonList JS
  详细解决方案

asp:RadioButtonList JS

热度:39   发布时间:2023-12-22 09:24:11.0
<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;}}}

参考文献:
https://www.oschina.net/question/54100_25614
http://blog.csdn.net/yuemugong/article/details/38137869?locationNum=9
http://www.java123.net/166375.html
https://zhidao.baidu.com/question/406069256.html
http://bbs.csdn.net/topics/80517170
http://www.cnblogs.com/uedt/articles/1691443.html