var
spDisp : IDispatch;
HtmlInputEle : IHTMLInputElement
begin
....
spDisp := ielc.item(J, 0);
if SUCCEEDED(spDisp.QueryInterface(IHTMLInputElement ,HtmlInputEle))then
因为item有好多种类型,所以最好对每一种都声明一个变量,像这里的HtmlInputEle 就是
一个网页中的input框。对每一种类型(或者只用你想处理的那几种也可以)用
spDisp.QueryInterface(类型接口 ,接口变量)) 来判断是否该类型,然后再访问该类型
变量的属性和方法。
**************************IHTMLElementCollection**********************
This interface provides access to a collection of element objects.
This collection is indexed first by name, then by id. If duplicate names are found, a collection of those named items is returned. Collections of duplicate names must subsequently be referenced by ordinal position.
A zero-based collection, in source order, of all elements in a given form. This collection can contain any combination of INPUT, SELECT, and TEXTAREA elements.
IHTMLElementCollection Methods toString put_length get_length
get__newEnum item tags
***************IHTMLElementCollection.Item****************************
HRESULT item(
VARIANT name,
VARIANT index,
IDispatch **pdisp
);