Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- dockerfile
- laravel
- react
- codeigniter4
- Python
- imagemagick
- NGINX
- ec2
- working directory
- props
- staging area
- vue
- SQL
- MySQL
- cron
- docker-compose
- pagination
- ubuntu
- linux
- centOS7
- php
- javascript
- Selenium
- ruby
- controller
- Ruby On Rails
- docker
- Wordpress
- Git
- AWS
Archives
- Today
- Total
목록addEventListener (1)
내가 한 노력들
[ JavaScript ] NodeList의 각 요소들에 addEventListener 적용하기
HTML detail detail ... 각기 다른 value값을 지닌 button 여러개를 준비 JavaScript const buttons = document.querySelectorAll('#button') buttons.forEach(button => button.addEventListener('click', (e) => { console.log(e.target.value) })); 각 버튼 요소를 누르면, 각 요소의 value 값을 console.log로 출력시킴 각 버튼을 클릭해보면, 콘솔창에서 각 button요소의 value값이 출력되는 것을 확인할 수 있습니다.
IT 공부/Javascript
2022. 3. 6. 17:32