[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/Web/API/HTMLInputElement/multiple [Back]  [Original]

HTMLInputElement: multiple - Web API | MDN

MDN Web Docs

View in English Always switch to English

HTMLInputElement: multiple

Baseline

20157

HTMLInputElement.multiple Firefox multiple <input type="file">

js
// fileInput  <input type=file multiple> 
let fileInput = document.getElementById("myfileinput");

if (fileInput.multiple) {
  // fileInput.files 
  for (const file of fileInput.files) {
    // 
  }
  // 
} else {
  let [file] = fileInput.files;
}

HTML
# dom-input-multiple


Web Proxy Viewer  |  New URL  |  Original Page