\n \n \n\n \n
\n \n\n

HTML DOM Object Object

\n \n \n\n
\n\n

Object Object

\n

The Object object represents an HTML <object> element.

\n\n

Access an Object Object

\n

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

\n\n
var x = document.getElementById("myObject");
\n\n

Create an Object Object

\n

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

\n\n
var x = document.createElement("OBJECT");\nx.setAttribute("type", "image/gif");\nx.setAttribute("data", "helloworld.gif");
\n\n

Object Object Properties

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
PropertyDescription
alignNot supported in HTML5. Use CSS instead.
Sets or returns the alignment of the object according to the surrounding elements.
archiveNot supported in HTML5.
Sets or returns a string that can be used to implement your own archive functionality for the object.
borderNot supported in HTML5. Use CSS instead.
Sets or returns the border of the object.
codeNot supported in HTML5.
Sets or returns the filename of the Java class for the object.
codeBaseNot supported in HTML5.
Sets or returns the URL where the object code is located.
codeTypeNot supported in HTML5.
Sets or returns the media type of the object code.
dataSets or returns the URL of the object data.
declareNot supported in HTML5.
Sets or returns whether the object should be declared only or also displayed.
formReturns the parent form element of the object.
heightSets or returns the height of the object.
hspaceNot supported in HTML5. Use CSS instead.
Sets or returns the horizontal margin of the object.
nameSets or returns the name of the object.
standbyNot supported in HTML5.
Sets or returns a message that will be displayed while the object is loading.
typeSets or returns the media type of the object data.
useMapSets or returns the name of the client-side image map to be used with the object.
hspaceNot supported in HTML5. Use CSS instead.
Sets or returns the vertical margin of the object.
widthSets or returns the width of the object.
\n\n

Standard Properties and Events

\n

The Object object also supports standard properties and events.

\n\n

Related Pages

\n

HTML Reference: HTML <object> Tag

\n\n
\n \n
\n\n \n \n