處理RadioButtonList客戶端事件
<asp:RadioButtonList ID="rblNeedNotification"
BorderWidth="0" onclick="NeedNotificationSelectedItemChange();" runat="server"
RepeatDirection="Horizontal">
<asp:ListItem Value="0" >不要通報</asp:ListItem>
<asp:ListItem Value="1" Selected="True">需要通報</asp:ListItem>
</asp:RadioButtonList>
function NeedNotificationSelectedItemChange()
{
var needNotification=document.getElementById(prefix+"rblNeedNotification_"+"1").checked;
var show=needNotification?"visible":"hidden";
document.getElementById(prefix+"txtNotificationTime").disabled=!needNotification;
document.getElementById(prefix+"txtHandledProcess").disabled=!needNotification;
document.getElementById(prefix+"txtLossStatistic").disabled=!needNotification;
document.getElementById(prefix+"txtReasonAnalyse").disabled=!needNotification;
document.getElementById(prefix+"txtImprovementMeasure").disabled=!needNotification;
document.getElementById(prefix+"fontNotificationTime").style.visibility=show;
document.getElementById(prefix+"fontHandledProcess").style.visibility=show;
document.getElementById(prefix+"fontLossStatistic").style.visibility=show;
document.getElementById(prefix+"fontReasonAnalyse").style.visibility=show;
document.getElementById(prefix+"fontImprovementMeasure").style.visibility=show;
}
BorderWidth="0" onclick="NeedNotificationSelectedItemChange();" runat="server"
RepeatDirection="Horizontal">
<asp:ListItem Value="0" >不要通報</asp:ListItem>
<asp:ListItem Value="1" Selected="True">需要通報</asp:ListItem>
</asp:RadioButtonList>
function NeedNotificationSelectedItemChange()
{
var needNotification=document.getElementById(prefix+"rblNeedNotification_"+"1").checked;
var show=needNotification?"visible":"hidden";
document.getElementById(prefix+"txtNotificationTime").disabled=!needNotification;
document.getElementById(prefix+"txtHandledProcess").disabled=!needNotification;
document.getElementById(prefix+"txtLossStatistic").disabled=!needNotification;
document.getElementById(prefix+"txtReasonAnalyse").disabled=!needNotification;
document.getElementById(prefix+"txtImprovementMeasure").disabled=!needNotification;
document.getElementById(prefix+"fontNotificationTime").style.visibility=show;
document.getElementById(prefix+"fontHandledProcess").style.visibility=show;
document.getElementById(prefix+"fontLossStatistic").style.visibility=show;
document.getElementById(prefix+"fontReasonAnalyse").style.visibility=show;
document.getElementById(prefix+"fontImprovementMeasure").style.visibility=show;
}