$('input[type=checkbox]').change(function() {
      if (this.checked) {
        $(this).attr("value","1");
      }else{
        $(this).attr("value","0");
      }
    });
 或者直接:var status=$("input[type='radio']:checked").val();