HTML DOM ObjectObject


The Object Object

The Object Object represents an HTML <object> element.

The <object> element is used to include objects in a web page, such as images, audio, video, Java applets, ActiveX, PDF, Flash, etc.

Accessing the Object Object

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

var x = document.getElementById("myObject"); Try it Yourself

Creating the Object Object

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

var x = document.createElement("OBJECT"); Try it Yourself

Object Object Properties

Property Description
align Not supported in HTML5. Usestyle.cssFloatinstead.
Sets or returns the alignment of the object relative to the surrounding text.
archive Not supported in HTML5.
Sets or returns a string that implements the archive function of the object.
border Not supported in HTML5. Usestyle.borderinstead.
Sets or returns the border around the object.
code Not supported in HTML5.
Sets or returns the URL of the file that contains compiled Java classes.
codeBase Not supported in HTML5.
Sets or returns the URL of the component.
codeType Not supported in HTML5.
data  
declare Not supported in HTML5.
form Returns a reference to the parent form of the object.
height Sets or returns the height of the object.
hspace Not supported in HTML5. Usestyle.margininstead.
Sets or returns the horizontal margin of the object.
name Sets or returns the name of the object.
standby Not supported in HTML5.
Sets or returns the message when the object is loading.
type Sets or returns the content type of the data downloaded through the data attribute.
useMap  
vspace Not supported in HTML5. Usestyle.margininstead.
Sets or returns the vertical margin of the object.
width Sets or returns the width of the object.

Standard Properties and Events

The Object Object also supports standardPropertiesandEvents。


Related Articles

HTML Reference:HTML <object> Tag

Other Extensions