$.each用法(radio)

是否启用 <input type="radio" name="status" value='1' />启用
            <input type="radio" name="status" value="0" />禁用   

//i为数组下表,v为dom对象 

 $.each($("input[name='status']"),function(i,v){
             if(1==v.value){
              v.checked='checked';
             }
  });

posted @ 2016-12-30 14:31  JLCUI  阅读(55)  评论(0编辑  收藏  举报