Where there is a will , there is a way .
kenly

No pain , no gain .

 

處理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;
        }

posted on 2007-09-26 15:51  kenly33  阅读(2913)  评论(0编辑  收藏  举报

导航