(jQuery) ajax의 dataType 설정
/*sample*/ $.ajax({ method: 'post' , url: url , data: JSON.stringify(params) , url: url , data: JSON.stringify({ data1 : data1 }) , dataType: 'json' , contentType: "application/json" , success: function (d) { console.log(d); } , error: function (xhr, status, error) { alert("에러가 발생했습니다. 로그에서 메시지를 확인해 주세요."); console.error(error); } }); 1. dataType이란? server에서 front로 리턴하는 데이터의 타입. 사용자가 지정하지 않을 경우 ..
2023. 1. 3.