IHTMLDocument2 InterfaceGets information about the document, and examines and modifies the HTML elements and text in the document.获取文档信息并检查和修改HTML文档中的元素和文本。IHTMLDocument2 Members成员activeElement Gets the object that has the focus when the parent document has focus. 活动元素 获取获得焦点的文档对象的子对象alinkColor Sets or gets the color of all active links in the document. 连接色 设置或获取文档活动连接的颜色all Gets an interface pointer to a zero-based collection of all the elements in an HTML document. 所有 获取一个HTML文档中所有元素的一个索引偏移基于0的集合的接口指针。anchors Gets an interface pointer to a zero-based collection of all the a objects in an HTML document. 锚点 获取一个HTML文档中所有对象的一个索引偏移基于0的集合的接口指针。applets Gets an interface pointer to a zero-based collection of all of the applet objects in an HTML document. 小应用程序 获取一个HTML文档中所有小应用程序的一个索引偏移基于0的集合的接口指针。bgColor Deprecated. Sets or retrieves a value that indicates the background color behind the object. 背景色 已弃用。body Gets an interface pointer to the document body object. 主体 获取文档主体对象的一个接口指针。charset Sets or retrieves the character set used to encode the object. 字符集 设/取对象的编码字符集。clear Not currently supported. 清空 未支持。close Closes an output stream and forces the sent data to display. 关闭 关闭输出流并强制显示已发送数据。cookie Sets or gets the string value of a cookie. cookie 设/取cookie的字串值。createElement Creates an instance of the element for the specified tag. 创建元素 创建指定目标的元素实例。createStyleSheet Creates a style sheet for the document. 创建样式表单defaultCharset Gets the default character set from the current regional language settings. 默认字符集designMode Sets or gets a value that indicates whether the document can be edited. 设计模式 设/取代表文档是否能被修改的值。domain Sets or gets the security domain of the document. 域 设/取文档的安全域。elementFromPoint Returns the element for the specified x coordinate and the specified y coordinate. 点所在的元素 返回指定坐标处的元素。embeds Gets an interface pointer to a zero-based collection of all of the embed objects in an HTML document. 内嵌对象 获取一个HTML文档中所有内嵌对象的一个索引偏移基于0的集合的接口指针。execCommand Executes a command on the current document, current selection, or the given range. 执行命令 在当前文档、集合或范围内执行一个命令。execCommandShowHelp Displays help information for the given command identifier. 显示执行命令帮助 显示给出的命令标识符的帮助信息。expando Sets or retrieves a value indicating whether arbitrary variables can be created within the object. 扩展 设置或检索一个代表对象中是否可以创建任意的变量的值fgColor Sets or gets the foreground (text) color of the document. 前景色fileCreatedDate Retrieves the date the file was created. 文件创建的数据fileModifiedDate Retrieves the date the file was last modified. 文件修改的数据fileSize Retrieves the file size. 文件大小fileUpdatedDate Retrieves the date the file was last updated. 文件更新的数据forms Gets an interface pointer to a zero-based collection of all the form objects in an HTML document. 表单集frames Gets 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. 框架集images Gets 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. 图片集lastModified Gets the date that the page was last modified, if the page supplies one. 最后修改的(数据)linkColor Sets or gets the color of the document links. 连接色links Gets an interface pointer to a zero-based collection of all of the link objects and the area objects in an HTML document. 连接集location Retrieves an interface pointer to a location object. 位置mimeType Retrieves the MIME type for the file. MIME类型nameProp Gets the title of the document file. 名字属性onafterupdate Sets or retrieves a pointer to the event handler function associated with the onafterupdate event. AfterUpdate事件onbeforeupdate Sets or retrieves a pointer to the event handler function associated with the onbeforeupdate event. BeforeUpdate事件onclick Sets or retrieves a pointer to the event handler function associated with the onclick event. Click事件ondblclick Sets or retrieves a pointer to the event handler function associated with the ondblclick event. DblClick事件ondragstart Sets or retrieves a pointer to the event handler function associated with the ondragstart event. DragStart事件onerrorupdate Sets or retrieves a pointer to the event handler function associated with the onerrorupdate event. ErrorUpdate事件onhelp Sets or retrieves a pointer to the event handler function associated with the onhelp event. Help事件onkeydown Sets or retrieves a pointer to the event handler function associated with the onkeydown event. KeyDown事件onkeypress Sets or retrieves a pointer to the event handler function associated with the onkeypress event. KeyPress事件onkeyup Sets or retrieves a pointer to the event handler function associated with the onkeyup event. KeyUp事件onmousedown Sets or retrieves a pointer to the event handler function associated with the onmousedown event. MouseDown事件onmousemove Sets or retrieves a pointer to the event handler function associated with the onmousemove event. MouseMove事件onmouseout Sets or retrieves a pointer to the event handler function associated with the onmouseout event. MouseOut事件onmouseover Sets or retrieves a pointer to the event handler function associated with the onmouseover event. MouseOver事件onmouseup Sets or retrieves a pointer to the event handler function associated with the onmouseup event. MouseUp事件onreadystatechange Sets or retrieves a pointer to the event handler function associated with the onreadystatechange event. ReadyStateChange事件onrowenter Sets or retrieves a pointer to the event handler function associated with the onrowenter event. RowEnter事件onrowexit Sets or retrieves a pointer to the event handler function associated with the onrowexit event. RowExit事件onselectstart Sets or retrieves a pointer to the event handler function associated with the onselectstart event. SelectStart事件open Opens 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. 打开 打开一个新窗体并装载指定URL处的文档。当然也可以,使用URL参数和名字参数打开一个新窗体来收集IHTMLDocument2::Write和IHTMLDocument2::Writeln方法的输出。parentWindow Gets a reference to the container object of the window. 父窗口plugins Gets an interface pointer to a zero-based collection of all of the embed objects in an HTML document. 插件集protocol Sets or retrieves the protocol portion of a URL. 协议queryCommandEnabled Returns a Boolean value that indicates whether a specified command can be successfully executed using IHTMLDocument2::execCommand, given the current state of the document. 查询命令可用(布尔值)queryCommandIndeterm Returns a Boolean value that indicates whether the specified command is in the indeterminate state. 模糊查询命令(布尔值)queryCommandState Returns a Boolean value that indicates the current state of the command. 查询命令状态(布尔值)queryCommandSupported Returns a Boolean value that indicates whether the current command is supported on the current range. 查询命令支持(布尔值)queryCommandText Retrieves the string associated with a command. 查询命令文本queryCommandValue Returns the current value of the document, range, or current selection for the given command. 查询命令值readyState Retrieves a value that indicates the current state of the object. 就绪状态 当前对象的状态值。referrer Gets the URL of the location that referred the user to the current page.来路 获取涉及用户当前页的URL的位置scripts Gets an interface pointer to a zero-based collection of all of the script objects in an HTML document. 脚本 获取HTML文档中的索引偏移基于0的脚本对象的数组security Not implemented. 安全性 未实现。selection Gets 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. 集合 获取代表活动集合对象的接口指针。活动集合可以是一个插入点,一块高亮文本,或文档中用户或脚本可以操作的元素。styleSheets Gets 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. 样式表单 获取一个文档对象的索引偏移基于0的样式表单集合的接口指针。每个样式表单对象代表文档中定义的一个单独的样式表单。title Sets or gets the title of the document. 标题toString Retrieves a string representation of the object. 返回字串URL Sets or gets the URL for the current document. URLvlinkColor Sets or gets the color of the links that the user has visited. 已浏览连接色write Writes one or more HTML expressions to a document in the specified window. 写writeln Writes 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.通常每个窗体对象都有一个关联的文档对象,这你可以通过使用IID_IHTMLDocument或IID_IHTMLDocument2接口标识符调用QueryInterface方法来获得。包含HTML文档的窗体通常有一个有效的文档对象;包含其他格式文档的窗体可能没有有效的文档对象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.一般情况下,在你试图获取不是当前窗体中的文档对象前,务必确定窗体关联的源文件是一个HTML文档文件或一个可以解释为一个HTML文档的文件,例如,一个文本文件。Interface Information接口信息Stock Implementation mshtml.dll Custom implementation No Inherits from IDispatch Header and IDL files Mshtml.h, Mshtml.idl Minimum availability Internet Explorer 4.0 Minimum operating systems Windows 95, Windows NT 4.0, Windows CE 2.12实现单元: mshtml.dll定制实现: 否继承自 IDispatch接口头和接口定义语言文件: Mshtml.h, Mshtml.idl最低浏览器支持IE4.0最低操作系统支持 Win95, NT4.0, WinCE2.12.其实会点英语就行,没想象的那么难吧?