Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Hosting and Reuse
MSHTML Reference
IHTMLMetaElement
 content Property
IHTMLMetaElement::content Property

Sets or retrieves meta-information to associate with IHTMLMetaElement::httpEquiv or IHTMLMetaElement::name.

Syntax

HRESULT IHTMLMetaElement::get_content(BSTR *p);
HRESULT IHTMLMetaElement::put_content(BSTR v);

Parameters

p
Pointer to a variable of type BSTR that receives one of the values listed in Possible Values.
v
BSTR that specifies one of the values listed in Possible Values.

Possible Values

descriptionMeta-information.
refreshInteger consisting of the number of seconds to elapse before the document is refreshed. This value requires the IHTMLMetaElement::httpEquiv to be set with the refresh value.
urlLocation that is loaded when the document is refreshed. This value requires the IHTMLMetaElement::httpEquiv to be set with the refresh value.
mimetypeMIME type used for the charset value.
charsetCharacter set of the document. This value requires the mimetype value to be set with a valid MIME type, and the IHTMLMetaElement::httpEquiv to be set with the refresh value.
noopenMicrosoft Internet Explorer 6 for Windows XP Service Pack 2 (SP2) and later. Hides the Open or Run button on the File Download dialog box. This value requires the IHTMLMetaElement::name attribute to be set with the DownloadOptions value.
nosaveInternet Explorer 6 for Windows XP SP2 and later. Hides the Save button on the File Download dialog box. This value requires the IHTMLMetaElement::name attribute to be set with the DownloadOptions value.
x-ua-compatibleWindows Internet Explorer 8 and later. A semi-colon delimited list of document compatibility modes supported by the Web page. This value requires the IHTMLMetaElement::httpEquiv to be set with the x-ua-compatible value.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

Developers using the httpEquiv and content attributes to refresh web pages from alternate URL's should treat the value of content as untrusted data. For more information, please see Security Considerations: Dynamic HTML.

 New for Internet Explorer 8 

As of Internet Explorer 8, httpEquiv also supports a value of x-ua-compatible, which allows content to specify the document compatibility modes supported by a Web page, using a string containing one or more of the following values.

ValueDescription
IE=8Web page supports IE8 mode, which is also called "IE8 standards mode."
IE=7Web page supports IE7 mode, which is also called "IE7 standards mode."
IE=5Web page supports IE5 mode, which is also called "quirks mode."
IE=EmulateIE8If the Web page specifies a standards-based DOCTYPE directive, the page supports IE8 mode; otherwise, it supports IE5 mode ("quirks mode").
IE=EmulateIE7If the Web page specifies a standards-based DOCTYPE directive, the page supports IE7 mode; otherwise, it supports IE5 mode ("quirks mode").
IE=EdgeWeb page supports the highest mode available to the version of Internet Explorer used to display the page. This option is generally intended for testing purposes.

Internet Explorer displays the page in the highest mode supported by the page. For more information, see Defining Document Compatibility.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker