Object type Property
Example
Get the media type of the object:
 var x =
 document.getElementById("myObject").type;
Try it Yourself »
Definition and Usage
The type property sets or returns the value of the type attribute of an <object> element.
The type attribute specifies the Internet media type (formerly known as MIME type) of the object.
Browser Support
| Property | |||||
|---|---|---|---|---|---|
| type | Yes | Yes | Yes | Yes | Yes | 
Syntax
Return the type property:
 objObject.type
Set the type property:
 objObject.type = media_type
Property Values
| Value | Description | 
|---|---|
| media_type | Specifies the Internet media type of the embedded content. Look at IANA Media Types for a complete list of standard media types. | 
Technical Details
| Return Value: | A String, representing the Internet media type of the embedded content | 
|---|
Related Pages
HTML reference: HTML <object> type attribute
❮ Object Object

