contentType property

Gets the Content-Type property in the HTML request or response header.

Internet Explorer 8

Syntax

JavaScript
p = object.contentType

Property values

Type: Variant

the text of the content-type header.

Examples


// 1. Create XDR object 
xdr = new XDomainRequest(); 

// 2. Open connection with server using GET method
xdr.open("GET", "http://www.contoso.com/xdr.txt");

// 3. Display the content-type
alert(xdr.contentType);

See also

Reference
IHTMLXDomainRequest
XDomainRequest
Conceptual
Introducing Cross-domain Request

 

 

Show:
© 2014 Microsoft. All rights reserved.