您的位置:首页 > Web前端 > HTML

IHTMLDocument2 Interface 汉化

2011-12-31 09:21 537 查看
IHTMLDocument2 Members

activeElementGets the object that has the focus when the parent
document has focus.

当它的父文档拥有焦点时 获得当前focus的子对象

alinkColorSets or gets the color of all active links in the document.

设置或获取文档中所有活动链接的颜色

allGets an interface pointer to a zero-based collection of all the elements in an HTML document.

获取一个HTML文档中的所有元素的一个基于0的数组的指针

anchorsGets an interface pointer to a zero-based collection of all the
a objects in an HTML document.

获取一个HTML文档中的所有独立对象的一个基于0的数组的指针
appletsGets an interface pointer to a zero-based collection of all of the
applet objects in an HTML document.

获取一个HTML文档中的所有应用对象的一个基于0的数组的指针
bgColorDeprecated. Sets or retrieves a value that indicates the background color behind the
object.

(不赞成的) 设置或返回背景颜色的值.

bodyGets an interface pointer to the document
body object.

获取document body对象的指针

charsetSets or retrieves the character set used to encode the object.

设置或获取当前使用的字符集编码的对象。

clearNot currently supported.

目前不支持。

closeCloses an output stream and forces the sent data to display.

关闭一个输出流 和强制显示要发送的数据。(?)

cookieSets or gets the string value of a cookie.

设置或获取cookie的string value.

createElementCreates an instance of the element for the specified tag.

通过指定的标记创建一个元素的实例.

createStyleSheetCreates a style sheet for the document.

为文档创建一个style sheet(css样式表).

defaultCharsetGets the default character set from the current regional language settings.

从当前的区域语言设置获取默认字符集编码.

designModeSets or gets a value that indicates whether the document can be edited.

设置或得到一个值,表明该文档是否可以进行编辑.

domainSets or gets the security domain of the document.

设置或获得文档的安全域.

elementFromPointReturns the element for the specified x coordinate and the specified
y coordinate.

从指定的x坐标和y坐标获取元素

embedsGets an interface pointer to a zero-based collection of all of the
embed objects in an HTML document.

获取一个HTML文档中的所有嵌入对象的一个基于0的数组的指针

execCommandExecutes a command on the current document, current selection, or the given range.

执行一个命令对当前文档,当前的选定,或指定范围.

execCommandShowHelpDisplays help information for the given command identifier.

显示帮助信息,提供命令的标识。

expandoSets or retrieves a value indicating whether arbitrary variables can be created within the
object.

设置或返回一个值指示是否任意变量可以创建的对象。(?)

fgColorSets or gets the foreground (text) color of the document.

设置或获取文档的前景色.

fileCreatedDateRetrieves the date the file was created.

返回文件的创建时间

fileModifiedDateRetrieves the date the file was last modified.

返回文件最后修改时间

fileSizeRetrieves the file size.

返回文件大小.

fileUpdatedDateRetrieves the date the file was last updated.

返回文件最后更新时间

formsGets an interface pointer to a zero-based collection of all the
form objects in an HTML document.

获取一个HTML文档中的所有form对象的一个基于0的数组的指针

framesGets an interface pointer to a zero-based collection of all of the
frame objects in an HTML document, if the document contains the

frameSet object. Gets an interface pointer to a zero-based collection of all of the

iframe objects in the document, if the document contains the
body object.

如果该文档包含frameSet对象,获取文档中的所有frame对象的数组指针.

如果该文档包含body对象,获取一个HTML文档中的所有iframe对象的数组指针.
imagesGets a pointer to the
IHTMLElementCollection interface of the zero-based collection of all of the

images in an HTML document. The images are in the same order as they appear in the document.

获取文档中的所有图像对象的数组指针.这些图像应该以相同的排序在文档中出现.

lastModifiedGets the date that the page was last modified, if the page supplies one.

获取页面的最后修改时间.(?)

linkColorSets or gets the color of the document links.

设置或获取document links的颜色.

linksGets an interface pointer to a zero-based collection of all of the
link objects and the
area objects in an HTML document.

获取文档中的所有link对象的数组指针

locationRetrieves an interface pointer to a location object.

获取一个location的指针.(?)

mimeTypeRetrieves the MIME type for the file.

获取文件的MIME类型.

namePropGets the title of the document file.

获取文档文件的标题.

onafterupdateSets or retrieves a pointer to the event handler function associated with the
onafterupdate event.

更新完毕后事件

onbeforeupdateSets or retrieves a pointer to the event handler function associated with the
onbeforeupdate event.

开始更新前事件

onclickSets or retrieves a pointer to the event handler function associated with the
onclick event.

鼠标单击事件

ondblclickSets or retrieves a pointer to the event handler function associated with the
ondblclick event.

鼠标双击事件

ondragstartSets or retrieves a pointer to the event handler function associated with the
ondragstart event.

开始拖拽事件

onerrorupdateSets or retrieves a pointer to the event handler function associated with the
onerrorupdate event.

更新错误事件

onhelpSets or retrieves a pointer to the event handler function associated with the
onhelp event.

帮助事件

onkeydownSets or retrieves a pointer to the event handler function associated with the
onkeydown event.

keydown事件

onkeypressSets or retrieves a pointer to the event handler function associated with the
onkeypress event.

keypress事件

onkeyupSets or retrieves a pointer to the event handler function associated with the
onkeyup event.

keyup键盘

onmousedownSets or retrieves a pointer to the event handler function associated with the
onmousedown event.

onmousemoveSets or retrieves a pointer to the event handler function associated with the

onmousemove event.
onmouseoutSets or retrieves a pointer to the event handler function associated with the

onmouseout event.
onmouseoverSets or retrieves a pointer to the event handler function associated with the

onmouseover event.
onmouseupSets or retrieves a pointer to the event handler function associated with the

onmouseup event.
onreadystatechangeSets or retrieves a pointer to the event handler function associated with the

onreadystatechange event.
onrowenterSets or retrieves a pointer to the event handler function associated with the

onrowenter event.
onrowexitSets or retrieves a pointer to the event handler function associated with the

onrowexit event.
onselectstartSets or retrieves a pointer to the event handler function associated with the

onselectstart event.
openOpens a new window and loads a document specified by a given URL. Also, opens a new window that uses the
url parameter and the name parameter to collect the output of the

IHTMLDocument2::write method and the
IHTMLDocument2::writeln method.
parentWindowGets a reference to the container object of the window.
pluginsGets an interface pointer to a zero-based collection of all of the embed objects in an HTML document.
protocolSets or retrieves the protocol portion of a URL.
queryCommandEnabledReturns a Boolean value that indicates whether a specified command can be successfully executed using

IHTMLDocument2::execCommand, given the current state of the document.
queryCommandIndetermReturns a Boolean value that indicates whether the specified command is in the indeterminate state.
queryCommandStateReturns a Boolean value that indicates the current state of the command.
queryCommandSupportedReturns a Boolean value that indicates whether the current command is supported on the current range.
queryCommandTextRetrieves the string associated with a command.
queryCommandValueReturns the current value of the document, range, or current selection for the given command.
readyStateRetrieves a value that indicates the current state of the object.
referrerGets the URL of the location that referred the user to the current page.
scriptsGets an interface pointer to a zero-based collection of all of the
script objects in an HTML document.
securityNot implemented.
selectionGets an interface pointer to an object representing the active selection. The active selection can be an insertion point, a highlighted block of text, or another element in the document that the user or a script can carry out an action on.
styleSheetsGets an interface pointer to a zero-based collection of the style sheet objects exposed from the document object. Each style sheet object represents an individual style sheet that is defined for the document.
titleSets or gets the title of the document.
toStringRetrieves a string representation of the object.
URLSets or gets the URL for the current document.
vlinkColorSets or gets the color of the links that the user has visited.
writeWrites one or more HTML expressions to a document in the specified window.
writelnWrites one or more HTML expressions, followed by a carriage return, to a document in the specified window.
Remarks

Typically, every window object has a corresponding document object that you can get by calling the

QueryInterface method with the IID_IHTMLDocument or IID_IHTMLDocument2 interface identifiers. Windows that contain HTML documents always have valid document objects; windows that contain documents in other formats might
not have valid document objects.

In general, before you attempt to get the document object for a window that is not the current window, make sure that the source file associated with that window is an HTML document file or a file that can be represented as an HTML document, for example,
a text file.

Interface Information

Stock Implementationmshtml.dll
Custom ImplementationNo
Inherits fromIDispatch
Header and IDL filesMshtml.h, Mshtml.idl
Minimum availabilityInternet Explorer 4.0
Minimum operating systemsWindows 95, Windows NT 4.0, Windows CE 2.12
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: