[JavaScript] 이벤트 함수를 callback 함수로 호출
·
frontend/javascript
지난번 학교 수업에서 웹 서비스 개발 프로젝트를 진행했는데, 해당 프로젝트 과정에서 자바스크립트 파일 내에서 특정 엘리먼트에 이벤트 함수를 지정하는 코드를 작성했다. let new_input = document.createElement('input'); new_input.setAttribute("id", theater); new_input.setAttribute("type", 'radio'); new_input.setAttribute("value", theater); new_input.setAttribute("class", 'theater_city'); new_input.setAttribute("name", 'theater_city'); new_input.onclick = theaterCity_onCli..