자바스프링 하다가 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
git init
git add .
git commit -m "환경세팅완료 v1"
git remote add origin 주소
git push origin master

git init  깃허브 시작할떄 무조건 사용한다

git add . 커밋할거 모두 추가 라는 뜻

git commit -m  커밋할때 옆에 저장하기

git remote add origin +주소  저장할떄 주소 자기가 저장할  레파지토리

git push origin master 마스터 푸쉬한다

const bttn = document.getElementById('bttn');//id속성있을때 사용한다
const nav = document.getElementById('nav');

bttn.addEventListener('click', () => { 
    nav.classList.toggle('active');//toggle()토글이란  on/off의 개념으로 스위치를 켰다,껏다하는기능이 있다
    bttn.classList.toggle('active');
});

https://developer.mozilla.org/ko/docs/Web/API/Document/getElementById

 

Document.getElementById() - Web API | MDN

Document.getElementById() 메서드는 주어진 문자열과 일치하는 id 속성을 가진 요소를 찾고, 이를 나타내는 Element 객체를 반환합니다. ID는 문서 내에서 유일해야 하기 때문에 특정 요소를 빠르게 찾을

developer.mozilla.org

 

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

Uncaught TypeError:$ajax is not a function error  (0) 2023.02.21
js 비교 연산자  (0) 2023.02.07
javasrcipt 예약어 특징  (0) 2023.02.07

js

연산자   기능  사용예
==  피연산자 값이 같으면 true 3=="3" true
=== 피연산자값과 데이터 유형이 모두같으면  true  a==="3" false
!= 피연산자값이 값지않으면 true 3!= "3"false
!== 피연산자값과 데이터 유형이 모두 값지않으면 true 3!=="3" true
     
     

다른 언어엔 없고 자바스크랩트 에만있는 기능을 올려봤다 

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

Uncaught TypeError:$ajax is not a function error  (0) 2023.02.21
about toggle and getElementById  (0) 2023.02.09
javasrcipt 예약어 특징  (0) 2023.02.07
예약어  선언 하지않고 사용할 경우 재선언 재할당
var 오류없음 (호이스팅 발생) O O
let 오류발생 X O
const 오류 발생 X X

웹개발 공부하다가  자바스크랩트를 공부안해서 변수 예약대한 정리 할필요있다고 생각해서 정리봅니다

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

Uncaught TypeError:$ajax is not a function error  (0) 2023.02.21
about toggle and getElementById  (0) 2023.02.09
js 비교 연산자  (0) 2023.02.07