Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
HTMLInputElement.files 속성은 <input type="file"> 요소로 선택한 FileList에 접근할 수 있습니다.
선택한 파일이 있는 경우 해당 파일을 나열하는 FileList 객체입니다. **HTMLInputElement**가 type="file"이 아닌 경우는 null입니다.
이 예제에서는 HTMLInputElement.files 속성에 접근하여 사용자가 선택한 각 파일의 이름, 수정된 날짜, 크기 및 타입을 로그에 출력합니다.
**HTMLInputElement.files**는 파일이 선택되지 않은 경우에도 FileList의 인스턴스를 반환합니다. 따라서 파일 선택 여부를 확인하지 않아도 for...of를 사용하여 이를 안전하게 반복할 수 있습니다.
| HTML # dom-input-files-dev |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025년 6월 27일 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.