我在我的 ajax 请求中收到错误 200。我想在我的 ajax 请求中向页面发布 1 个值,这是一个电子邮件地址。有人可以告诉我出了什么问题
错误:
message=:[object Object], text status=:parsererror, error thrown:=SyntaxError: JSON.parse: unexpected end of data
jQuery
$('#checkemail').click(function() {
$.ajax({
url:'http://' + location.host + '/buyme/include/getemailaddress.php',
type:'POST',
contentType: "application/json; charset=utf-8",
data: {email:$('#email').val()},
dataType:"json",
success: function(msg) {
alert(msg);
},
error: function(ms, textStatus, errorThrown) {
alert(errorThrown);
}
});/**/
});