mimeType property (document, a, img)
Retrieves the type of the document file or the type of a linked file.
This type is different from the MIME type, it is the description that belongs to the file extension in the current operating system.
If you need the MIME type of the current document, use the contentType property although it is only supported by Firefox.
You can find the related objects in the Supported by objects section below.
This property is read-only.
String that represents the description of the file extension.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the mimeType property:
Did you find this example helpful?
User Contributed Comments