通过添加如下所示的成功和错误回调,使您的JQuery调用更加健壮:
$('#ChangePermission').click(function() { $.ajax({ url: 'change_permission.php', type: 'POST', data: { 'user': document.GetElementById("user").value, 'perm': document.GetElementById("perm").value }, success: function(result) { //we got the response alert('Successfully called'); }, error: function(jqxhr, status, exception) { alert('Exception:', exception); } }) })


