HTMLSelectElement: multiple property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{ APIRef("HTML DOM") }}

The **multiple** property of the {{DOMxRef("HTMLSelectElement")}} interface specifies that the user may select more than one option from the list of options. It reflects the {{htmlelement("select")}} element's [multiple](/en-US/docs/Web/HTML/Reference/Elements/select#multiple) attribute.

Value

A boolean.

Examples

js
const selectElement = document.getElementById("comment");
console.log(selectElement.multiple);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{HTMLElement("select")}}
  • {{DOMXref("HTMLSelectElement.selectedOptions")}}
  • {{DOMXref("HTMLSelectElement.length")}}
  • {{DOMXref("HTMLSelectElement.selectedIndex")}}