2015-01-16
AJAX로 데이터를 보낼때, 데이터에 +가 있으면 모두 사라진채로 전송 된다.
이럴때는 encodeURIComponent() 함수로 데이터를 인코딩 하여 보내면 제대로 전송 된다.
$.ajax({
  type: "POST",
  data: "vals="+encodeURIComponent('abcd+efg+hijkkkk'),
  url: "/mm_ajax",
  success: function(data){
    alert( data );
  error: function(xhr, option, error){
        alert(xhr.status); //오류코드
        alert(error); //오류내용
  }
});