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
- codeigniter4
- centOS7
- pagination
- vue
- Git
- Ruby On Rails
- docker-compose
- imagemagick
- cron
- MySQL
- ruby
- working directory
- laravel
- staging area
- Python
- react
- Selenium
- linux
- ubuntu
- Wordpress
- javascript
- NGINX
- AWS
- props
- SQL
- dockerfile
- controller
- php
- ec2
- docker
Archives
- Today
- Total
내가 한 노력들
[ Vue.js ]데이터의 속성값 가져오는 법 본문
방법
event.target.getAttribute(속성명);
사용
<button @click=“getAttribute” data=“1004”>클릭</button>
methods: {
getAttribute(e) {
console.log(e.target.getAttribute('data'));
}
}
'IT 공부 > Vue' 카테고리의 다른 글
[ Vue ] 형제 컴포넌트간의 통신하는 방법 (0) | 2022.12.01 |
---|---|
[ Vue.js ] 문자열을 코드로 인식하게 하기 (0) | 2021.08.17 |
[ Vue.js ] ref 속성을 이용한, 태그 가져오기 (0) | 2021.08.17 |
[ Vue.js ] 게시판만들기 (Update, Delete) (0) | 2021.08.05 |
[ Vue.js ] 게시판만들기 (Read, Create) (0) | 2021.08.04 |