item函数的用法

来源:互联网 发布:润和软件待遇 编辑:程序博客网 时间:2024/05/01 17:47
 

1)
这个接口返回的是一个Elem,不是Coll
当name指定的elem有多个时,通过index参数确定返回哪一个
[in] VARIANT of type VT_I4 that specifies the zero-based index of the object to retrieve when a collection is returned.
比如有2个name = "abc"的elem,则 item("abc", 0, ...) item("abc", 1, ...)分别返回第一二个elem

2)
你种情况 使用 get_children 得到一个coll,在这个coll上 IHTMLElementCollection::tags("radio" 得到所有raido的集合coll2, 然后通过上面的方法遍历coll2即可。

3) 你不清楚name相同的元素个数有多少?
按照上面的方法,index不停++, 当pdisp [out, retval] 为NULL时,就说明遍历完了!

 

原文:http://topic.csdn.net/u/20101017/11/e21a7024-420f-40c4-bb5d-87a4051fc468.html

 

有那么复杂吗? 可怜

原创粉丝点击