I want to change button text on success.. I want to change this to accepted after success
    <button type="button" onclick="saveData<?php echo $row1->id; ?>()">Accept</button> 
      <script>
      function saveData<?php echo $rrr->id; ?>(){
      $.ajax({
        type: "POST",
        url: "<?php echo base_url().'home/accept_seller/'. $rrr->id; ?>",
        data:{},       
        success:function( data )
        {
        }
       });
  }
My function is properly working because i have used alert after success but i dontknow how to chage its text after success. pls help
 
     
     
     
     
     
    