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

a close up shot of letter dice on an open notebook

이벤트 함수를 등록해서 쓰고 싶은데, 2가지 방식이 있네  on(‘change’) vs change()  둘다 맞는데, 머 정답이라기 보다는 그냥 on(이벤트, function() {}); 형태로 사용하는 것을 강권합니다. 동적으로 생긴 컴포넌트도 쓸수있도록 하려면 on(‘change’,… 를 쓰라고 하네요. 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…

JQuery – select 변경 form sumbit

select box 값을 변경하면 자동으로 form submit() 해 버리고 싶은데, 어떻게 하나요? 엄청 간단하게 알려주세요. 🙂 How to Submit Form on Select Change I have the following form. I’d like it to be submitted automatically via jQuery when the user makes a selection, without needing to press the submit button. How do I do this? <form action=”″ me… Stack OverflowRick Helston 정답은 아래 코드를 참고하세요 $(document).ready(function() { $(‘#선택박스아이디’).on(‘change’, function() { document.forms[myFormName].submit(); });});// 혹은$(document).ready(function() { $(‘#선택박스아이디’).change(function() { var parentForm = $(this).closest(“form”);…