content Property
Returns or sets a String that represents the value of the content attribute that is associated with the http-equiv or name attribute of a META element.
expression.content
*expression * Required. An expression that returns one of the objects in the Applies To list.
Remarks
The content property can be one or more of the following values:
description |
Meta-information. |
refresh |
Integer consisting of the number of seconds to elapse before the document is refreshed. This value requires the HTTP-EQUIV attribute to be set with the refresh value. |
url |
Location that is loaded when the document is refreshed. This value requires the HTTP-EQUIV attribute to be set with the refresh value. |
mimetype |
MIME type used for the charset value. |
charset |
Character set of the document. This value requires the mimetype value to be set with a valid MIME type, and the HTTP-EQUIV attribute to be set with the Content-Type value. |
Example
The following example inserts a <META> tag that contains the character set to use for the active document.
Sub InsertCharset(ByRef objDoc As FPHTMLDocument, ByRef strID As String, _
ByRef strHTTP As String, ByRef strContent As String, ByRef strCharset As String)
Dim objMeta As FPHTMLMetaElement
objDoc.all.tags("head").Item(0) _
.innerHTML = "<META id=""" & strID & """>"
Set objMeta = ActiveDocument.all.tags("meta").Item(CVar(strID))
With objMeta
.httpEquiv = strHTTP
.content = strContent
.Charset = strCharset
End With
End Sub
Use the following example to call the preceding subroutine.
Sub CallInsertCharset()
Call InsertCharset(objDoc:=ActiveDocument, strID:="iso_content", _
strHTTP:="Content-Type", strContent:="text/html", strCharset:="ISO Latin-1")
End Sub
Applies to | FPHTMLMetaElement Object | IHTMLMetaElement Object