자바스프링 하다가 js와 연동할떄 있었다 계속 $ajax쪽에서 에러가 나길래 구글링해봤는데$.ajax를 사용하기위해서 slim제거해야지 오류가 해결된다 참고하자

  <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.3/dist/jquery.slim.min.js"></script> 
  //slim 제거하고사용하자

 

  <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.3/dist/jquery.min.js"></script>

 

 

 

 
 

Neither of the answers here helped me. The problem was: I was using the slim build of jQuery, which had some things removed, ajax being one of them.

https://stackoverflow.com/questions/18271251/typeerror-ajax-is-not-a-function

 

TypeError: $.ajax(...) is not a function?

I'm attempting to create an AJAX request. Here's my function definition: function AJAXrequest(url, postedData, callback) { $.ajax({ type: 'POST', url: url, data: postedD...

stackoverflow.com

 

'개발 공부 > js' 카테고리의 다른 글

about toggle and getElementById  (0) 2023.02.09
js 비교 연산자  (0) 2023.02.07
javasrcipt 예약어 특징  (0) 2023.02.07