티스토리 뷰
728x90
Javascript 체크 방법
if( document.getElementById("videoUploadFile").files.length == 0 ){
console.log("no files selected");
}
jQuery 체크 방법
if ($('#videoUploadFile')[0].files.length === 0) {
console.log("No files selected.");
}
jQuery에서 $(selector)[0] 이 가지는 의미는 선택된 요소의 첫 번째 DOM 객체를 찾는 의미이다.
참고
What does $(selector)[0] mean in jQuery?
728x90
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- Bash tab
- JavaScript
- Java
- input
- LocalDate
- Github Status
- mybatis
- 북리뷰
- svn
- 베리 심플
- Linux
- window
- localtime
- Spring Security
- docker
- mybatis config
- 프로페셔널 스튜던트
- maven
- intellij
- config-location
- 오라클
- rocky
- springboot
- elasticsearch
- Mac
- Kotlin
- LocalDateTime
- Spring
- jQuery
- oracle
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함