A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/zh-CN/docs/Web/API/HTMLInputElement/multiple below:

HTMLInputElement.multiple - Web API | MDN

HTMLInputElement.multiple

Baseline Widely available

HTMLInputElement.multiple 属性表示一个 input 是否可以有多个值。目前只有火狐支持 <input type="file">存有多个值。

实例
// fileInput is a <input type=file multiple>
let fileInput = document.getElementById("myfileinput");

if (fileInput.multiple == true) {
  for (let i = 0; i < fileInput.files.length; i++) {
    // Loop fileInput.files
  }

  // Only one file available
} else {
  let file = fileInput.files.item(0);
}
See also Specification Browser compatibility

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4