Option form attribute
Definition and Usage
form
Property returns a reference to the form containing the options.
This property returns the form object on success.
See also:
HTML Reference Manual:HTML <option>-etiket
Example
Return the id: of the form containing the <option> element with id="apple":
var x = document.getElementById("apple").form.id;
Syntaks
optionObject.form
Tekniske detaljer
Returværdi: |
Reference til formularelement, der indeholder valg. Hvis valget ikke er i formularen, returneres null. |
---|
Browserstøtte
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |