티스토리 뷰
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
- springboot
- Spring
- svn
- Java
- 프로페셔널 스튜던트
- config-location
- jQuery
- mybatis
- window
- docker
- localtime
- LocalDate
- Mac
- Kotlin
- input
- Linux
- intellij
- 베리 심플
- JavaScript
- Spring Security
- elasticsearch
- oracle
- 북리뷰
- maven
- 오라클
- mybatis config
- Github Status
- rocky
- Bash tab
- LocalDateTime
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함