IHTMLDocument2::elementFromPoint Method--------------------------------------------------------------------------------Returns the element for the specified x and y coordinates. SyntaxHRESULT elementFromPoint(
    long x,
    long y,
    IHTMLElement **elementHit
);
Parametersx
[in] long that specifies the X-offset, in pixels.
y
[in] long that specifies the Y-offset, in pixels.
elementHit
[out, retval] Address of a pointer to an element object. 

解决方案 »

  1.   

    all Property (IHTMLDocument2)--------------------------------------------------------------------------------Retrieves an interface pointer to a zero-based collection of all the elements in an HTML document. SyntaxHRESULT IHTMLDocument2::get_all(IHTMLElementCollection **p);
    Parametersp
    Address of a pointer to an IHTMLElementCollection interface that receives the collection of elements. 
    Return ValueReturns S_OK if successful, or an error value otherwise. 
      

  2.   

    all Property (IHTMLDocument2)--------------------------------------------------------------------------------Retrieves an interface pointer to a zero-based collection of all the elements in an HTML document. SyntaxHRESULT IHTMLDocument2::get_all(IHTMLElementCollection **p);
    Parametersp
    Address of a pointer to an IHTMLElementCollection interface that receives the collection of elements. 
    Return ValueReturns S_OK if successful, or an error value otherwise. 
      

  3.   

    搞没搞错,我现在用的是VB,而且我只得到HTMLDocument,你的办法
    不适用
      

  4.   

    OK,取出了IHTMLElement ,但是这个好像没用呀?标签名称和id 还是得
    不到呀
      

  5.   

    IHTMLElement 里 tagName 属性 是标签名,id 用 getAttribute 得到。
    好好看看MSDN吧,很容易查到的。
      

  6.   

    谢谢二位。
    我的msdn里面没有这方面资料,真是惨。