Ajax1 [Ajax] Uncaught TypeError : Illegal invocation 해결법 $.ajax({ url: 'http://localhost:8080/chat/receive', type: 'POST', data: data, // 수정부분 contentType: false, processData: false, success: function (res) { console.log("Success!!"); }, }); Ajax로 데이터를 넘겨줄 때 Uncaught TypeError : Illegal invocation 에러가 발생했는데, 이는 알맞은 데이터 타입이 와야 하는데, 다른 데이터 타입이 들어와서 나는 오류이다. 위와 같이 contentType, processData의 옵션을 false로 주면 해결된다. 기본적으로 보통 JSON 데이터를 받으려면 contentType: applicat.. 개발/Frontend 2023. 10. 14. 이전 1 다음