English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML 参考手册

HTML 标签大全

HTML object form Attribute

form 属性指定 <object>元素所属的一种或多种形式。

 HTML <object> Tag

在线示例

位于表单之外的<object>元素(但仍然是表单的一部分):

<!DOCTYPE html>
<html>
<head>
<title>HTML: <object> form Attribute - 基础教程网(oldtoolbag.com)</title>
</head>
<body>
<form action="action_page.php" id="form1">
First name: <input type="text" name="fname"><br>
<input type="submit" value="Submit">
</form>
<object data="bookmark.swf" width="400" height="400" name="obj1" form="form1></object>
</body>
</html>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Almost all mainstream browsers do not support the form attribute.

Definition and Usage

The form attribute specifies the type of form that the <object> element belongs to.

HTML 4.01 and HTML5differences between

The form attribute in HTML5 New attribute added to.

Syntax

<object form="form_id">

Attribute Value

ValueDescription
form_idSpecify the <object> element's parent <form> element. The value of this attribute must be the id attribute of a <form> element in the same document.
 HTML <object> Tag