执行 ajax 请求后,我从服务器收到以下响应:
{"error":false,"success":true}
我的ajax代码:
$.ajax({
url: '/update',
type: 'post',
data: $(this).serialize(),
success: function(response) {
alert(response)
},
error: function() {
alert('An error occured, form not submitted.');
}
});
我不想提醒整个响应,而是想提醒“成功”的值,在本例中这是正确的。这个怎么做?
Like so:
alert(response.success);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)