Object type attribute
Definition and Usage
type
Sets or returns the type of the <object> element's attribute type attribute Value.
The type attribute specifies the Internet media type of the object (formerly known as MIME type).
See also:
HTML Reference Manual:HTML <object> type Attribute
HTML Reference Manual:HTML <object> Tag
Example
Get the media type of the object:
var x = document.getElementById("myObject").type;
Syntax
Return the type attribute:
objObject.type
Set the type attribute:
objObject.type = media_type
Attribute value
Value | Description |
---|---|
media_type |
Specify the Internet media type of the embedded content. Please see IANA MIME Types, to get the complete list of standard media types. |
Technical Details
Return Value: | A string value representing the Internet media type of the embedded content. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |