Link type Property

❮ Link Object

Example

Return the MIME-type of the linked document:

var x = document.getElementById("myLink").type;
Try it Yourself »

Description

The type property sets or returns the content type (MIME type) of the linked document.

Tip: Examples of MIME-types are: "text/css", "text/javascript", "image/gif", etc.


Browser Support

Property
type Yes Yes Yes Yes Yes

Syntax

Return the type property:

linkObject.type

Set the type property:

linkObject.type = MIME-type

Property Values

Value Description
MIME-type The MIME type of the linked document.
Look at IANA MIME types for a complete list of standard MIME types

Technical Details

Return Value: A String, representing the content type of the linked document

❮ Link Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.