原文发布时间为:2010-07-01 —— 来源于本人的百度文章 [由搬家工具导入]

IHTMLDocument2 Interface
Gets information about the document, and examines and modifies the HTML elements and text in the document.

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. anchors Gets an interface pointer to a zero-based collection of all the a objects in an HTML document. applets Gets an interface pointer to a zero-based collection of all of the applet objects in an HTML document. 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. 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. 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. nameProp Gets the title of the document file. onafterupdate Sets or retrieves a pointer to the event handler function associated with the onafterupdate event. onbeforeupdate Sets or retrieves a pointer to the event handler function associated with the onbeforeupdate event. onclick Sets or retrieves a pointer to the event handler function associated with the onclick event. ondblclick Sets or retrieves a pointer to the event handler function associated with the ondblclick event. ondragstart Sets or retrieves a pointer to the event handler function associated with the ondragstart event. onerrorupdate Sets or retrieves a pointer to the event handler function associated with the onerrorupdate event. onhelp Sets or retrieves a pointer to the event handler function associated with the onhelp event. onkeydown Sets or retrieves a pointer to the event handler function associated with the onkeydown event. onkeypress Sets or retrieves a pointer to the event handler function associated with the onkeypress event. onkeyup Sets or retrieves a pointer to the event handler function associated with the onkeyup event. onmousedown Sets or retrieves a pointer to the event handler function associated with the onmousedown event. onmousemove Sets or retrieves a pointer to the event handler function associated with the onmousemove event. onmouseout Sets or retrieves a pointer to the event handler function associated with the onmouseout event. onmouseover Sets or retrieves a pointer to the event handler function associated with the onmouseover event. onmouseup Sets or retrieves a pointer to the event handler function associated with the onmouseup event. onreadystatechange Sets or retrieves a pointer to the event handler function associated with the onreadystatechange event. onrowenter Sets or retrieves a pointer to the event handler function associated with the onrowenter event. onrowexit Sets or retrieves a pointer to the event handler function associated with the onrowexit event. onselectstart Sets or retrieves a pointer to the event handler function associated with the onselectstart event. 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. 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. scripts Gets an interface pointer to a zero-based collection of all of the script objects in an HTML document. 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. 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. vlinkColor 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.

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 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

http://msdn2.microsoft.com/en-us/library/aa752574(VS.85).aspx

//可以枚举所有的网页链接,然后循环取出即可。
//下面是代码:
//已经调试通过,注意:要在uses里引用mshtml单元。
//效果图见下图:
var
doc:   IHTMLDocument2;
all:   IHTMLElementCollection;
len,   i:   integer;
item:   OleVariant;
begin
doc   :=   WebBrowser1.Document   as     IHTMLDocument2;
all   :=   doc.links;      
len   :=   all.length;
for   i   :=   0   to   len-1   do
begin
item   :=   all.item(i,   varempty);  
if   ListBox.IndexOf(item.href)   =   -1       then
begin
ListBox1.Items.Append(item.href);
end;
end;
end;

IHTMLDocument2的所有成员、属性、方法、事件[转]的更多相关文章

  1. HTML5 Audio/Video 标签,属性,方法,事件汇总

    HTML5 Audio/Video 标签,属性,方法,事件汇总 (转) 2011-06-28 13:16:48   <audio> 标签属性:src:音乐的URLpreload:预加载au ...

  2. HTML5 Audio/Video 标签,属性,方法,事件汇总 (转)

    HTML5 Audio/Video 标签,属性,方法,事件   <audio> 标签属性:src:音乐的URLpreload:预加载autoplay:自动播放loop:循环播放contro ...

  3. [转帖]HTML5 Audio/Video 标签,属性,方法,事件汇总

    HTML5 Audio/Video 标签,属性,方法,事件汇总 <audio>标签属性: src:音乐的URL preload:预加载 autoplay:自动播放 loop:循环播放 co ...

  4. php 类中设置成员属性方法

    class FileUpload { private $path = "./uploads"; //上传文件保存的路径 private $allowtype = array('jp ...

  5. [转载]HTML5 Audio/Video 标签,属性,方法,事件汇总

    <audio> 标签属性: src:音乐的URL preload:预加载 autoplay:自动播放 loop:循环播放 controls:浏览器自带的控制条 <audio id=& ...

  6. delphi 常用属性+方法+事件+代码+函数

    内容居中(属性) alignment->tacenter mome控件 禁用最大化(属性) 窗体-> BorderIcons属性-> biMaximize-> False 让鼠 ...

  7. vue2.0 配置 选项 属性 方法 事件 ——速查

    全局配置 silent  设置日志与警告  optionMergeStrategies   合并策略  devtools  配置是否允许vue-devtools  errorHandler    错误 ...

  8. HTML5 Audio/Video 标签,属性,方法,事件汇总 (转)

    标签属性:src:音乐的URLpreload:预加载autoplay:自动播放loop:循环播放controls:浏览器自带的控制条 1 http://www.abc.com/test.mp3&quo ...

  9. 【转载】HTML5 Audio/Video 标签,属性,方法,事件汇总

    <audio> 标签属性: src:音乐的URL preload:预加载 autoplay:自动播放 loop:循环播放 controls:浏览器自带的控制条 Html代码  <au ...

  10. JavaScript面向对象(二)——成员属性、静态属性、原型属性与JS原型链

      前  言 JRedu 上一篇博客中,我们介绍了JS中的面向对象,并详细的解释了this的指向问题.本篇博客,我们继续来学习JS的面向对象.来深入理解一下JavaScript OOP中的成员属性/方 ...

随机推荐

  1. linux 下备份mysql数据库

    今天老板让备份数据库没办法自己折腾吧,下面把折腾的结果总结总结. 数据库备份思路: 1.编写脚本 2.执行脚本  哈哈,是不是很简单,打开冰箱,放入大象,关上.下面我是具体操作. 一.编写脚本 1.设 ...

  2. (78)zabbix值缓存(value cache)说明

    在zabbix-2.2版本之前,zabbix计算trigger与calculated/aggregate值都是直接通过sql语句查询并处理出来的结果,为了提高这块的性能与效率,zabbix引入了val ...

  3. linux几种文件传输方式

    本文记录linux系统中文件传输的多种方式,留作备忘.linux中文件传输的方式有ftp,scp,rsync,rz,sz等,但各个工具的功能又有所区别: FTP : FTP是文件服务器,可实现文件的上 ...

  4. django+xadmin在线教育平台(三)

    通过留言版功能回顾django基础知识 将对于django目录结构,使用Django快速搭建可以提交的表单页面,models.py , urls.py, views.py. 从数据库中取出数据展示到h ...

  5. HTTP-点开浏览器输入网址背后发生的那点事

    前言 Internet最早来源于美国国防部ARPANet,1969年投入运行,到现在已有很长一段路了,各位想要了解发展史可以百度下,这里就不多说了. 现如今当我们想要获取一些资料,首先是打开某个浏览器 ...

  6. nodejs源码—初始化

    概述 相信很多的人,每天在终端不止一遍的执行着node这条命令,对于很多人来说,它就像一个黑盒,并不知道背后到底发生了什么,本文将会为大家揭开这个神秘的面纱,由于本人水平有限,所以只是讲一个大概其,主 ...

  7. jupyter notebook(一)——anaconda安装后jupyter不能自动跳转网页

    1.问题描述 之前没有遇到过.这次重装系统,发现安装anaconda这个集成版python后,jupyter notebook打开后不能自动跳转打开的交互网页. 系统是windows7.anacond ...

  8. lnmp启用pathinfo并隐藏index.php

    编辑如下区段: location ~ [^/]\.php(/|$) { # comment try_files $uri =404; to enable pathinfo try_files $uri ...

  9. 第2章 CentOS7集群环境配置

    目录 2.1 关闭防火墙 2.2 设置固定IP 2.3 修改主机名 2.4 添加用户 2.5 修改用户权限 2.6 新建目录 2.7 安装JDK 1.卸载系统自带的JDK 2.安装JDK 2.8 克隆 ...

  10. oracle redo 重做日志文件

    以下易容翻译自oracle dba官方文档,不足之处还望指出. 管理重做日志文件 学习目标:1.解释重做日志文件的目的2.描述重做日志文件的结构3.学会控制日志切换与检查点4.多元化管理重做日志文件5 ...