最近经常用到IHTMLxx接口,所以把一些常用的都收集起来,免得每次都查MSDN,麻烦。
IHTMLDocument2、IHTMLElement、IHTMLElementCollection、ITHMLFormElement、IHTMLInputElement、IHTMLTable、IHTMLAnchorElement
类IHTMLDocument2
1.       activeElement
当当前文档已经focus某个对象时,得到该网页元素
2.       alinkColor
得到或者设置文档中所有活动链接的颜色
3.       all      get_all(IHTMLElementCollection **p)
得到所有网页元素集合的接口
4.       anchors    get_anchors(IHTMLElementCollection **p)
得到所有链接元素集合的接口
5.       applets      get_applets(IHTMLElementCollection **p)
得到所有小应用程序元素集合的接口
6.       bgColor
设置或者得到网页对象的背景色
7.       body                   get_body(IHTMLElement **p)
得到body对象的集合
8.       charset
得到或者设置网页所有的编码
9.       cookie
得到或者设置cookie
10.   createElement_x
创建一个网页元素(比如创建一个表、按钮等)
11.   createStyleSheet
12.   defaultCharset
得到默认字符集
13.   designMode
得到或者设置文档编辑的设计模式
14.   domain
得到或者设置当前文档的域
15.   elementFromPoint
从坐标点得到网页元素
16.   embeds              get_embeds(IHTMLElementCollection **p)
从网页中得到embeds对象集合
17.   execCommand
18.   execCommandShowHelp
19.   fgColor
得到或设置前景色
20.   fileCreatedDate        fileModifiedDate      fileUpdateDate        filesize
获得文件创建的日期、修改的日期、更新的日期,文件大小
21.   forms         get_forms(IHTMLElementCollection **p)
获得表单元素集合的接口
22.   frames       get_frames(IHTMLFramesCollection2 **p)
获得帧元素集合的接口
23.   p_w_picpaths
获得图像元素集合的接口
24.   lastModified
25.   linkColor
得到或者设置网页链接的颜色
26.   links            get_links(IHTMLElementCollection **p)
得到链接元素集合的接口
27.   location     get_location(IHTMLLocation **p)
得到当前对象的location
28.   mimeType
29.   nameProp
得到文档文件的标题
30.   onafterupdate
得到或者设置一个指向onafterupdate事件的指针
31.   onbeforeupdate
32.   onclick
33.   ondblclick
34.   ondragstart
35.   onerrorupdate
36.   onhelp
37.   onkeydown
38.   onkeypress
39.   onkeyup
40.   onmousedown
41.   onmousemove
42.   onmouseout
43.   onmouseover
44.   onmouseup
45.   onreadystatechange
46.   onrowenter
47.   onrowexit
48.   onselectstart
49.   open
打开一个新的窗口,指向给定的URL
50.   parentWindow
得到一个窗口容器对象的引用
51.   plugins
得到所有embed对象集合的接口
52.   protocol
得到或者设置URL所用的协议(比如HTTP HTTPS等)
53.   queryCommandEnabled
54.   queryCommandState
55.   queryCommandSupported
56.   queryCommandText
57.   queryCommandValue
58.   readState
59.   referrer
60.   scripts       get_scripts(IHTMLElementCollection **p)
得到scripts元素集合的接口
61.   selection
62.   styleSheets
63.   title
得到或者设置文档标题
64.   URL
得到或者设置当前文档的URL
65.   vlinkColor
得到或者设置已打开过的链接的颜色
66.   write          writeln
向文档中写HTML
 
 
 
类IHTMLElementCollection
1.       _newEnum
2.       Item           item(VARIANT name,  VARIANT index, IDispatch **pdisp);
从集合中获得对象
3.       length       get_length(long *p)
得到或者设置集合中有多少对象
4.       tags            HRESULT tags(VARIANT tagName, IDispatch **pdisp )
获得标签名
 
类IHTMLElement
1.       all                get_all(IDispatch **p)
得到当前对象中的所有元素集合的接口
2.       children     get_children(IDispatch **p)
得到当前对象的子对象集合的接口
3.       className
得到或者设置当前对象的类名
4.       click
模拟点击,产生一个onclick事件
5.       contains
确认给定的元素是否在对象内
6.       document                  get_document(IHTMLDocument2 **p)
得到文档接口
7.       filters                  get_filters(IHTMLFiltersCollection **p)
得到一个集合过滤器
8.       getAttribute
9.       id                 get_id(BSTR *p)
得到对象的ID
10.   innerHTML        get_innerHTML(BSTR *p)
在对象的开始标签和结束标签之间得到或者设置HTML
11.   innerText
12.   insertAdjacentHTML
13.   insertAdjacentText
14.   isTextEdit
确认对象是否是TextRange对象
15.   lang   language
设置或者得到使用的语言
16.   onafterupdate
得到或者设置一个指向onafterupdate事件的指针
17.   onbeforeupdate
18.   onclick
19.   ondblclick
20.   ondragstart
21.   onerrorupdate
22.   onhelp
23.   onkeydown
24.   onkeypress
25.   onkeyup
26.   onmousedown
27.   onmousemove
28.   onmouseout
29.   onmouseover
30.   onmouseup
31.   onreadystatechange
32.   onrowenter
33.   onrowexit
34.   onselectstart
35.   outerHTML
36.   outerText
37.   parentElement
得到对象的父对象值
38.   parentTextEdit
39.   recordNumber
40.   removeAttribute
41.   scrollIntoView
42.   setAttribute
43.   sourceIndex
44.   style
45.   tagname
46.   title
类ITHMLFormElement
1.         _newEnum      Retrieves an enumerator for the collection.
2.         action      Sets or retrieves the URL to which the form content is sent for processing.
3.         dir   Sets or retrieves the reading order of the object. 
4.         elements         get_elements(IDispatch **p);
    得到表单内元素的接口
5.         encoding          Sets or retrieves the MIME encoding for the form. 
6.         item         HRESULT item(VARIANT name, VARIANT index, IDispatch **pdisp)
    获得表单内元素集合的接口
7.         length
    获得表单个数
8.         method            Sets or retrieves how to send the form data to the server.
9.         name                Sets or retrieves the name of the object.
10.     onreset            Sets or retrieves a pointer to the event handler function associated with an event. 
11.     onsubmit         Sets or retrieves a pointer to the event handler function associated with an event. 
12.     reset
    模拟表单重置
13.     submit
    模拟表单提交
14.     tags                  Retrieves a collection of objects that have the specified HTML tag name. 
15.   target                 Sets or retrieves the window or frame at which to target content. 
 
 
类IHTMLInputElement
1.         align        Sets or retrieves how the object is aligned with adjacent text. 
2.         alt            Sets or retrieves a text alternative to the graphic. 
3.         border     Sets or retrieves the width of the border to draw around the object. 
4.         checked Sets or retrieves the state of the check box or radio button.
5.         complete         Retrieves whether the object is fully loaded.
6.         createTextRange    Creates a TextRange object for the element.
7.         defaultChecked       Sets or retrieves the state of the check box or radio button. 
8.         defaultValue   Sets or retrieves the initial contents of the object. 
9.         disabled           Sets or retrieves a value that indicates whether the user can interact with the object. 
10.     dynsrc              Sets or retrieves the address of a video clip or VRML world to display in the window. 
11.     form                  Retrieves a reference to the form that the object is embedded in. 
12.     height               Sets or retrieves the height of the object. 
13.     hspace             Sets or retrieves the horizontal margin for the object. 
14.     indeterminate         Sets or retrieves whether the user has changed the status of a check box.
15.     loop                   Sets or retrieves the number of times a sound or video clip will loop when activated. 
16.     lowsrc             Sets or retrieves a lower resolution p_w_picpath to display. 
17.     maxLength      Sets or retrieves the maximum number of characters that the user can enter in a text control. 
18.     name                Sets or retrieves the name of the object.
19.     onabort            Sets or retrieves a pointer to the event handler function associated with the onabort event.    An onabort event occurs when loading the object causes an error.
20.     onchange        Sets or retrieves a pointer to the event handler function associated with the onchange event.          An onchange event occurs when the content of the object changes.
21.     onchange        Sets or retrieves a pointer to the event handler function associated with the onchange event.          An onchange event occurs when the content of the object changes.
22.     onerror            Sets or retrieves a pointer to the event handler function associated with the onerror event. An onerror event occurs when loading the object causes an error.
23.     onload              Sets or retrieves a pointer to the event handler function associated with the onload event. The onload event occurs immediately after the browser loads the object.
24.     onselect                    Sets or retrieves a pointer to the event handler function associated with the onselect event. An onselect event occurs at the beginning of a user-initiated select. This event can be canceled, and it participates in the bubbling model.
25.     readOnly          Sets or retrieves the value indicated whether the content of the object is read-only.
26.     readyState      Retrieves a value that indicates the current state of the object.
27.     select               Highlights the input area of a form element. 
28.     size                             Sets or retrieves the size of the control. 
29.     src            Sets or retrieves a URL to be loaded by the object. 
30.     start        Sets or retrieves when a video clip file should begin playing.
31.     status     Sets or retrieves the value indicating whether the control is selected.
32.     type         Retrieves or initially sets (IHTMLInputElement only) the type of input control represented by the object.
33.     value       Sets or retrieves the default or selected value of the control.
34.     vrml         Sets or retrieves the IHTMLDocument2::URL of the virtual reality modeling language (VRML) world to be displayed in the window. 
35.     vspace    Sets or retrieves the vertical margin for the object. 
36.     width       Sets or retrieves the calculated width of the object. 
IHTMLAnchorElement
 
accessKey       Sets or retrieves the accelerator key for the object.
blur          Causes the element to lose focus and fires the onblur event.
focus       Causes the element to receive the focus and executes the code specified by the onfocus event. 
hash        Sets or retrieves the subsection of the IHTMLAnchorElement::href property that follows the number sign (#).
host         Sets or retrieves the hostname and port number of the location or URL.
hostname        Sets or retrieves the host name part of the location or URL. 
href          Sets or retrieves the destination URL or anchor point. 
Methods          Sets or gets the list of HTTP methods supported by the object.
mimeType       Retrieves the MIME type for the file.
name       Sets or retrieves the name of the object.
nameProp       Retrieves the file name specified in the href or src property of the object.
onblur     Sets or retrieves a pointer to the event handler function associated with the onblur event.
onfocus   Sets or retrieves a pointer to the event handler function associated with the onfocus event.
pathname       Sets or retrieves the file name or path specified by the object. 
port         Sets or retrieves the port number associated with a URL.
protocol Sets or retrieves the protocol portion of a URL. 
protocolLong Gets the long name of the protocol, such as Hypertext Transfer Protocol, used by the browser to locate the item associated with the anchor.
rel            Sets or retrieves the relationship between the object and the destination of the link.
rev           Sets or retrieves the relationship between the object and the destination of the link.
search     Sets or retrieves the substring of the href property that follows the question mark. 
tabIndex          Sets or retrieves the index that defines the tab order for the object.
target     Sets or retrieves the window or frame at which to target content. 
urn           Sets or gets a Uniform Resource Name (URN) for a target document. 
 
 
IHTMLTable
align                  Sets or retrieves a value that indicates the table alignment. 
background     Sets or retrieves the background picture tiled behind the text and graphics in the object. 
bgColor            Deprecated. Sets or retrieves the background color behind the object. 
border     S       ets or retrieves the width of the border to draw around the object. 
borderColor    Sets or retrieves the border color of the object. 
borderColorDark    Sets or retrieves the color for one of the two colors used to draw the 3-D border of the object.
borderColorLight    Sets or retrieves the color for one of the two colors used to draw the 3-D border of the object.
caption             Retrieves the caption object of the table. 
cellPadding     Sets or retrieves the amount of space between the border of the cell and the content of the cell. 
cellSpacing      Sets or retrieves the amount of space between cells in a table. 
cols                   Sets or retrieves the number of columns in the table. 
createCaption         Creates an empty caption element in the table.
createTFoot    Creates an empty tFoot element in the table. 
createTHead           Creates an empty tHead element in the table. 
dataPageSize                    Sets or retrieves the number of records displayed in a table bound to a data source. 
deleteCaption         Deletes the caption element and its contents from the table. 
deleteRow      Removes the specified row (tr) from the element and from the rows collection. 
deleteTFoot             Deletes the tFoot element and its contents from the table. 
deleteTHead            Deletes the tHead element and its contents from the table. 
frame               Sets or retrieves the way the border frame around the table is displayed. 
height               Sets or retrieves the height of the object. 
insertRow       Creates a new row (tr) in the table, and adds the row to the rows collection. 
nextPage         Displays the next page of records in the data set to which the table is bound.
onreadystatechange      Sets or retrieves a pointer to the event handler function associated with the onreadystatechange event.
previousPage           Displays the previous page of records in the data set to which the table is bound.
readyState      Retrieves a value that indicates the current state of the object.
refresh             Refreshes the content of the table. This might be necessary after a call to a method such as IHTMLStyleSheet::removeRule, when the page does not automatically reflow.
rows                 Retrieves a collection of all rows in the table. This is a collection of all the tr elements       defined in the tHead, tBody, and tFoot elements of the table. 
rules                 Sets or retrieves which dividing lines (inner borders) are displayed. 
tBodies            Returns a collection of TBODY elements defined in this table. The length of this collection is the count of table bodies returned. 
tFoot                 Retrieves an IHTMLTableSection pointer to the foot section of a table.
tHead               Retrieves an IHTMLTableSection pointer to the head section of a table.
width                Sets or retrieves the width of the object.
 
本文来自CSDN博客,转载请标明出处: http://blog.csdn.net/starflier/archive/2010/06/02/5641431.aspx