Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Option form Property

Option form Property

Option Object Reference Option Object


Definition and Usage

The form property returns a reference to the form that contains the option.

This attribute returns the form object.

Syntax

optionObject.form


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the form attribute


Example

Example

This example returns the id of the form to which the selected option in the dropdown list belongs:

Runoob Tutorial(runoob.com)

Select your favorite fruit:

    

Try it »


Option Object Reference Option Object