Class HTMLCollection

Class HTMLCollection

Namespace: Aspose.Html.Collections
Assembly: Aspose.HTML.dll (25.1.0)

Aspose.Html.Collections.HTMLCollection đại diện cho một tập hợp tổng quát của Aspose.Html.Dom.Element.

[ComVisible(true)]
[DOMName("HTMLCollection")]
[DOMObject]
public abstract class HTMLCollection : DOMObject, INotifyPropertyChanged, IEnumerable<element>, IEnumerable

Kế thừa

objectDOMObjectHTMLCollection

Thực hiện

INotifyPropertyChanged, IEnumerable<element>, IEnumerable

Các thành viên kế thừa

DOMObject.GetPlatformType(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Các hàm khởi tạo

HTMLCollection()

protected HTMLCollection()

Thuộc tính

Length

Số lượng nút trong danh sách.

[DOMName("length")]
public abstract int Length { get; }

Giá trị thuộc tính

int

this[int]

Trả về mục thứ index trong tập hợp. Nếu index lớn hơn hoặc bằng số lượng nút trong danh sách, điều này sẽ trả về null.

[DOMName("item")]
public abstract Element this[int index] { get; }

Giá trị thuộc tính

Element

Các phương thức

GetEnumerator()

Lấy bộ đếm.

public abstract IEnumerator<element> GetEnumerator()

Trả về

IEnumerator<Element&gt;

Một đối tượng System.Collections.IEnumerator có thể được sử dụng để lặp qua tập hợp.

GetPlatformType()

Phương thức này được sử dụng để lấy đối tượng ECMAScript System.Type.

public override Type GetPlatformType()

Trả về

Type

Đối tượng ECMAScript System.Type.

NamedItem(string)

Trả về mục trong tập hợp khớp với tên đã chỉ định.

[DOMName("namedItem")]
[DOMNullable]
public Element NamedItem(string name)

Tham số

name string

Tên phần tử.

Trả về

Element

Phần tử đã khớp

Xem thêm

IEnumerable<t>, IEnumerable<t>, IDisposable </t></t></element>

 Tiếng Việt