JQuery – on(‘change’) vs change() 어떤 것을 쓰나?

이벤트 함수를 등록해서 쓰고 싶은데, 2가지 방식이 있네

on(‘change’) vs change()

둘다 맞는데, 머 정답이라기 보다는 그냥 on(이벤트, function() {}); 형태로 사용하는 것을 강권합니다.

동적으로 생긴 컴포넌트도 쓸수있도록 하려면 on(‘change’,… 를 쓰라고 하네요.

https://lookingfor.tistory.com/entry/JQuery-%ED%81%B4%EB%A6%AD-%EC%9D%B4%EB%B2%A4%ED%8A%B8-onclick-%EA%B3%BC-click-%EC%9D%98-%EC%B0%A8%EC%9D%B4

Subtitle for this block
## Frequently Asked Questions
Description for this block. Use this space for describing your block. Any text will do.
#### JQuery – on(‘change’) vs change() 어떤 것을 쓰나?
동적으로 생긴 컴포넌트도 쓸수있도록 하려면 on(‘change’,… 를 쓰라고 하네요.
#### Title for This Block
Description for this block. Use this space for describing your block. Any text will do. Description for this block. You can use this space for describing your block.
#### Title for This Block
Description for this block. Use this space for describing your block. Any text will do. Description for this block. You can use this space for describing your block.
Share: Twitter Facebook
Bongjun Hur's Picture

About Bongjun Hur

BJ is a dev.

Seoul, Korea https://devbj.com