jQuery:radio change事件及控件enabled、disabled设置



                            
                                每季:
                            
                                
                                
                                                                       
                                    
                                
                                
                                    
                                    
                                

        $("#season :radio").change(function() {     //id 为season行内radio值变化函数
            var season = $("input[name='Ji']:checked").val();           // 获取当前选中radio的值
            if (season == "rbJi0") {
                $("#dlSeason2").attr("disabled", false);        //  将下拉列表disable掉
                $("#dlSeason1").attr("disabled", true);
            }
            if (season == "rbJi") {
                $("#dlSeason1").attr("disabled", false);
                $("#dlSeason2").attr("disabled", true);
            }

        })  // end of radio function


你可能感兴趣的:(javascript,&,jquery)