I am posting some data using ajax and want to change the button text. I don’t really know where to start. The code I have so far is below:
$("input[type='button'][name='Subscribe']").click(function(e){
$.ajax({
type: "POST",
url: "test.php",
data:{
id: $(this).attr('id'),
idMembers: $(this).attr('idMembers')
},
success: function(msg){
alert("Subscribed");
}
})
});
1 Answer