728x90 stopPropagation1 e.preventDefault() 와 stopPropagation() 의 차이 e.preventDefault() html 에서 a 태그나 submit 태그는 고유의 동작이 있다. 페이지를 이동시킨다거나 form 안에 있는 input 등을 전송한다던가 그러한 동작이 있는데 e.preventDefault 는 그 동작을 중단시킨다. e.stopPropagation() 상위 엘리먼트들로의 이벤트 전파를 중단시킨다. 2021. 3. 18. 이전 1 다음 반응형