HTML <object> formAttribute

HTML object 标签参考手册HTML <object> Tag

Example

An <object> element located outside the form (but still part of the form):

<form action="demo_form.html" id="form1">
First name: <input type="text" name="fname"><br>
<input type="submit" value="Submit">
</form>

<object data="helloworld.swf" height="400" width="400" form="form1" name="obj1"></object>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Almost all major browsers do not support the form attribute.


Definition and Usage

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


Differences between HTML 4.01 and HTML5

The form attribute is a new attribute in HTML5.


Syntax

<object form="form_id">

Attribute Values

Value Description
form_id Specifies a space-separated list of ids of one or more forms to which the <object> element belongs.


HTML object 标签参考手册HTML <object> Tag Other Extensions