\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```HTML DOM Object Object
\n \n \n\n\n\n
Object Object
\nThe Object object represents an HTML <object> element.
\n\nAccess an Object Object
\nYou can use getElementById() to access an <object> element:
var x = document.getElementById("myObject");\n\n Create an Object Object
\nYou can use the document.createElement() method to create an <object> element:
var x = document.createElement("OBJECT");\nx.setAttribute("type", "image/gif");\nx.setAttribute("data", "helloworld.gif");\n\n Object Object Properties
\n\n| Property | \nDescription | \n
|---|---|
| align | \nNot supported in HTML5. Use CSS instead. Sets or returns the alignment of the object according to the surrounding elements. | \n
| archive | \nNot supported in HTML5. Sets or returns a string that can be used to implement your own archive functionality for the object. | \n
| border | \nNot supported in HTML5. Use CSS instead. Sets or returns the border of the object. | \n
| code | \nNot supported in HTML5. Sets or returns the filename of the Java class for the object. | \n
| codeBase | \nNot supported in HTML5. Sets or returns the URL where the object code is located. | \n
| codeType | \nNot supported in HTML5. Sets or returns the media type of the object code. | \n
| data | \nSets or returns the URL of the object data. | \n
| declare | \nNot supported in HTML5. Sets or returns whether the object should be declared only or also displayed. | \n
| form | \nReturns the parent form element of the object. | \n
| height | \nSets or returns the height of the object. | \n
| hspace | \nNot supported in HTML5. Use CSS instead. Sets or returns the horizontal margin of the object. | \n
| name | \nSets or returns the name of the object. | \n
| standby | \nNot supported in HTML5. Sets or returns a message that will be displayed while the object is loading. | \n
| type | \nSets or returns the media type of the object data. | \n
| useMap | \nSets or returns the name of the client-side image map to be used with the object. | \n
| hspace | \nNot supported in HTML5. Use CSS instead. Sets or returns the vertical margin of the object. | \n
| width | \nSets or returns the width of the object. | \n
Standard Properties and Events
\nThe Object object also supports standard properties and events.
\n\nRelated Pages
\nHTML Reference: HTML <object> Tag
\n\n\n \n
YouTip