나는 다음과 같은 코드가 있습니다,jQuery를 AJAX POST 보내기 변수
데이터 : 내가 문제가 함께 할 것입니다 생각var result = confirm("You want to Subscribe to our Newsletter?");
var emailAddress = $("#subscribeEmail").val();
if (result == true) {
$.ajax({
type: 'POST',
url: '/php/subscribeNewsletter.php',
data: '{"email": "' + emailAddress + '"}',
complete: function(r){
alert(r.responseText);
}
});
}
: '{ "+ EMAILADDRESS +'" "이메일"을 '}'
서버 측에 빈 $ _POST 배열이 나타납니다.
이 데이터를 사용해보십시오 : JSON.stringify ({email : emailAddress}), –