HtmlWindowCollection.Item[] 属性

定义

通过项的 name 属性或在集合中的位置来检索项。

重载

Item[Int32]

通过提供框架在集合中的位置检索框架窗口。

Item[String]

通过提供框架的名称检索框架窗口。

注解

Item[] 允许使用数组语法访问集合的元素。

Item[Int32]

通过提供框架在集合中的位置检索框架窗口。

public:
 property System::Windows::Forms::HtmlWindow ^ default[int] { System::Windows::Forms::HtmlWindow ^ get(int index); };
public System.Windows.Forms.HtmlWindow this[int index] { get; }
member this.Item(int) : System.Windows.Forms.HtmlWindow
Default Public ReadOnly Property Item(index As Integer) As HtmlWindow

参数

index
Int32

HtmlWindow 在集合中的位置。

属性值

HtmlWindow

与请求的框架相对应的 HtmlWindow

例外

index 大于集合中的项数。

注解

HtmlWindowCollection 是一个从零开始的集合。 如果集合中有 N 个元素,则有效自变量 Item[] 是 0 到 N-1 的整数。

Windows未按HtmlWindowCollection任何预先确定的顺序进行布局。

另请参阅

适用于

Item[String]

通过提供框架的名称检索框架窗口。

public:
 property System::Windows::Forms::HtmlWindow ^ default[System::String ^] { System::Windows::Forms::HtmlWindow ^ get(System::String ^ windowId); };
public System.Windows.Forms.HtmlWindow this[string windowId] { get; }
member this.Item(string) : System.Windows.Forms.HtmlWindow
Default Public ReadOnly Property Item(windowId As String) As HtmlWindow

参数

windowId
String

要检索的 HtmlWindow 的名称。

属性值

HtmlWindow

与所提供的名称相对应的 HtmlWindow 元素。

例外

windowId 不是当前文档中或它的任何子对象中的 Frame 对象的名称。

注解

Item[] 将返回一个元素,其 Name 属性对应于 elementId。 如果文档包含多个具有相同名称的元素, Item[] 则仅返回集合中的第一个元素。 如果需要检索具有 NamewindowId属性的所有元素,请改用该方法 GetElementsByName

另请参阅

适用于