Latest web development tutorials

HTML DOM Object Object

Object Object

Object object represents an HTML <object> element.

<Object> element is used to contain an object on the page, such as: images, audio, video, Java applet, ActiveX, PDF, Flash and so on.

Access Object Object

You can use getElementById () to access the <object> element:

var x = document.getElementById("myObject"); 尝试一下

Create Object Object

You can use the document.createElement () method to create <object> element:

var x = document.createElement("OBJECT"); 尝试一下

Object Object Properties

属性 描述
align HTML5 中不支持。使用 style.cssFloat 替代。
设置或返回对象相对于周围文本的对齐方式。
archive HTML5 中不支持。
设置或返回一个用于实现对象存档功能的字符串。
border HTML5 中不支持。使用 style.border 替代。
设置或返回围绕对象的边框。
code HTML5 中不支持。
设置或返回文件的 URL,该文件包含已编译的 Java 类。
codeBase HTML5 中不支持。
设置或返回组件的 URL。
codeType HTML5 中不支持。
data
declare HTML5 中不支持。
form 返回对对象的父表单的引用。
height 设置或返回对象的高度。
hspace HTML5 中不支持。使用 style.margin 替代。
设置或返回对象的水平外边距。
name 设置或返回对象的名称。
standby HTML5 中不支持。
设置或返回在加载对象时的消息。
type 设置或返回通过 data 属性下载的数据的内容类型。
useMap
vspace HTML5 中不支持。使用 style.margin 替代。
设置或返回对象的垂直外边距。
width 设置或返回对象的宽度。

Standard properties and events

Object Object also supports standard attributes and events .


related articles

HTML Reference Manual: HTML <Object> tag