本文介绍了单选按钮文本在javascript中不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
function Select_Options(){
var ddl = document.getElementById(<%=ddl_selection_Cet.ClientID%> );
var SelVal = ddl.options [ddl.selectedIndex] .value;
if(SelVal ==1){
document.getElementById('<% = rad_Between.ClientID %> ')。style.visibility ='visible';
document.getElementById('<% = rad_date.ClientID %> ')。 style.visibility ='visible';
document.getElementById('<% = row_amount.ClientID %> ')。style.display =none
document.getElementById('<% = row_Date.ClientID %> ')。style.display =block
}
if(SelVal ==2){
document.getElementById('<% = rad_Between.ClientID %> ')。style.visibility ='hidden';
document.getElementById('<% = rad_date.ClientID %> ')。 style.visibility ='hidden';
document.getElementById('<% = row_amount.ClientID %> ')。style.display =block
document.getElementById('<% = row_Date.ClientID %> ')。style.display =none
}
if(SelVal ==0 ){
document.getElementById('<% = rad_date.ClientID %> ')。style.visibility ='hidden';
document.getElementById('<% = rad_Between.ClientID %> ')。 style.visibility ='hidden';
document.getElementById('<% = row_amount.ClientID %> ')。style.display =none
document.getElementById('<% = row_Date.ClientID %> ')。style.display =none
}
}
< / script >
帮帮我
解决方案
function Select_Options() { var ddl = document.getElementById("<%=ddl_selection_Cet.ClientID%>"); var SelVal = ddl.options[ddl.selectedIndex].value; if(SelVal=="1") { document.getElementById('<% = rad_Between.ClientID %>').style.visibility = 'visible'; document.getElementById('<% = rad_date.ClientID %>').style.visibility = 'visible'; document.getElementById('<% = row_amount.ClientID %>').style.display = "none" document.getElementById('<% = row_Date.ClientID %>').style.display = "block" } if (SelVal == "2") { document.getElementById('<% = rad_Between.ClientID %>').style.visibility = 'hidden'; document.getElementById('<% = rad_date.ClientID %>').style.visibility = 'hidden'; document.getElementById('<% = row_amount.ClientID %>').style.display = "block" document.getElementById('<% = row_Date.ClientID %>').style.display = "none" } if (SelVal == "0") { document.getElementById('<% = rad_date.ClientID %>').style.visibility = 'hidden'; document.getElementById('<% = rad_Between.ClientID %>').style.visibility = 'hidden'; document.getElementById('<% = row_amount.ClientID %>').style.display = "none" document.getElementById('<% = row_Date.ClientID %>').style.display = "none" } } </script>
help me
解决方案
这篇关于单选按钮文本在javascript中不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!