HtmlWindowCollection.Item[] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
根據項目 name 的屬性或在集合中的位置來檢索項目。
多載
| 名稱 | Description |
|---|---|
| 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; }
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 應於所要求的框架。
例外狀況
index 大於收藏中的項目數量。
備註
HtmlWindowCollection 是一個零基集合。 若集合中有 N 個元素,對 Item[] 的有效參數為 0 到 N-1 的整數。
窗戶並非按預設順序排列 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; }
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與所提供名稱對應的元素。
例外狀況
windowId 在目前文件中,也不是其任何子文件中物件的名稱 Frame 。
備註
Item[] 將回傳一個屬性 Name 對應於 elementId的單一元素。 如果文件包含多個同名元素, Item[] 則只會回傳集合中的第一個元素。 如果你需要取得所有屬性為 Name 的 windowId元素,請改用 這個 GetElementsByName 方法。