为什么ASP.net RadioButtonList onchange客户端事件没有触发?
我有asp.net项目,我有一个主页面,我包括这一行,以参考JS文件
在JS文件中我有这个function:
function hideDiv() { document.getElementById('div1').style.display = 'none'; document.getElementById('div2').style.display = 'none'; if (document.getElementById('RadioButtonTipoUser_0') != null) { if (document.getElementById('RadioButtonTipoUser_0').checked) { document.getElementById('div1').style.display = 'block'; } } if (document.getElementById('RadioButtonTipoUser_1') != null) { if (document.getElementById('RadioButtonTipoUser_1').checked) { document.getElementById('div2').style.display = 'block'; } } }
基本上我需要在这个RadioButtonList上,在Js“hideDiv()”上调用一个函数,当选择一个Button时,一个div隐藏传递给可见。
此代码包含在内容中。
Dome Emp Vet