共用方式為


IHTMLAttributeCollection interface

Provides the ability to programmatically access items in an element's attribute collection.

Members

The IHTMLAttributeCollection interface inherits from the IDispatch interface. IHTMLAttributeCollection also has these types of members:

  • Methods
  • Properties

Methods

The IHTMLAttributeCollection interface has these methods.

Method Description
item

Retrieves an attribute for an element from an attributes collection.

 

Properties

The IHTMLAttributeCollection interface has these properties.

Property Description

length

Sets or retrieves the number of objects in a collection.

 

Remarks

Use the following procedure to get an IHTMLAttributeCollection interface pointer for an element.

  1. Call QueryInterface on the element interface to request an IHTMLDOMNode interface.
  2. Call IHTMLDOMNode::attributes on the IHTMLDOMNode interface to get an IDispatch interface pointer for the element's IHTMLAttributeCollection interface.
  3. Call QueryInterface on the IDispatch interface to request an IHTMLAttributeCollection interface.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IDispatch

IHTMLAttributeCollection2