Event.preventDefault()

정은경·2022년 2월 14일
0

👸 Front-End Queen

목록 보기
181/261

e.preventDefault()

  • html 에서 a 태그나 submit 태그는 고유의 동작이 있다. 페이지를 이동시킨다거나 form 안에 있는 input 등을 전송한다던가 그러한 동작이 있는데 e.preventDefault 는 그 동작을 중단시킨다.

Reference

profile
#의식의흐름 #순간순간 #생각의스냅샷

0개의 댓글