Option form 属性
实例
返回包含 id="apple" 的 <option> 元素的表单的 id:
var x = document.getElementById("apple").form.id;
Syntax
optionObject.form
Technische Details
Rückgabewert: |
Verweis auf das Formularelement, das Optionen enthält. Wird das Option nicht im Formular gefunden, wird null zurückgegeben. |
---|
Browser-Unterstützung
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Unterstützung | Unterstützung | Unterstützung | Unterstützung | Unterstützung |