FREE Web Template Download
HTML CSS JAVASCRIPT SQL PHP BOOTSTRAP JQUERY ANGULARJS TUTORIALS REFERENCES EXAMPLES Blog
 

Object form Property

Object Object Reference Object Object

Example

Get the id of the form the <object> element belongs to:

var x = document.getElementById("myObject").form.id;

The result of x will be:

form1
Try it Yourself »

Definition and Usage

The form property sets or returns the value of the form attribute of an <object> element.

The form attribute specifies one or more forms the <object> element belongs to.


Browser Support

Property
form Yes Yes Yes Yes Yes

Note: The form property is supported in all major browsers. However, the form attribute of the <object> element is not supported in any of the major browsers.


Syntax

Return the form property:

objObject.form

Set the form property:

objObject.form=form_id

Property Values

Value Description
form_id Specifies the <form> element the <object> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document.

Technical Details

Return Value: A String, representing one or more forms the object belongs to

Related Pages

HTML reference: HTML <object> form attribute


Object Object Reference Object Object