我已经写了下面的代码使用jQuery进行Ajax调用:阿贾克斯jQuery的不工作
$.ajax({
url: 'verify.php',
type: 'POST',
data: {
'mobile': 'update'
}
success: function(response) {
if (response == 'success') {
$('#popupscreen').fadeOut('slow');
}
else {
$("#error").html("<p>" + Registration failed! Please try again. + "</p>").show();
}
}
});
我收到错误未捕获的SyntaxError:意外的标识符合成功:函数(响应){ 为什么我得到这个错误?
'$(“#error”)。html(“
注册失败!请重试
“).show();' – undefined如果您的问题中的初始代码格式与您在IDE中的格式相同,那么您应该考虑学习一些代码格式规则,它会帮助您(和其他人)阅读你自己的代码很多 –