반응형
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 |
Tags
- Array
- date
- 배열
- 정규식
- 이탈리아
- input
- Visual Studio Code
- Maven
- windows
- javascript
- string
- CSS
- html
- 이클립스
- Eclipse
- ArrayList
- 문자열
- IntelliJ
- table
- json
- 테이블
- CMD
- 인텔리제이
- vscode
- Java
- js
- 자바
- Button
- list
- 자바스크립트
Archives
- Today
- Total
목록toggle (1)
어제 오늘 내일
[Javascript] class 추가/변경/삭제/읽기 (className, classList)
class 이름 읽기 class 추가/수정 class 삭제 class toggle 특정 클래스 이름이 class 속성에 포함되는지 확인하기 1. class 이름 읽기 예제 1. className function handleOnClick() { alert(document.getElementById('ex').className); } document.getElementById('ex').className; element.className 속성은 element의 클래스 이름을 문자열로 리턴합니다. 예제 2. classList // class 이름 읽기 function getClassName() { alert(document.getElementById('ex').classList); } // class item..
IT/Javascript
2020. 12. 29. 08:13