0
Im가 내 아약스 요청에 200 오류가 발생합니다. 내 아약스 요청의 페이지에 이메일 주소 인 1 개의 값을 게시하고 싶습니다. 누군가가 잘못PHP ajax 요청 반환 문자열
오류가 무엇인지 말해 줄 수 : 서버에서
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);
}
});/**/
});
오류 200? 200은 성공을위한 코드입니다. 오류 메시지에서 유효한 JSON을 반환하지 않는다고 의심됩니다. –
그리고'getemailaddress.php'는 무엇입니까? –
당신의'getemailaddress.php'를 보여주세요. – coolguy