THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Object type Property

Object Object Reference Object Object

Example

Get the media type of the object:

var x = document.getElementById("myObject").type;

The result of x will be:

application/vnd.adobe.flash-movie
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 Reference Object Object