Collapse the table of content
Expand the table of content

uniqueID property

Retrieves an autogenerated, unique identifier for the object.


HRESULT value = object.get_uniqueID(* p);

Property values

Type: BSTR

BSTR that specifies the unique identifier.


When you apply this property to the document object, the client automatically generates a new ID that you can assign to an element's IHTMLElement::id property.

A new ID is generated and assigned to the element the first time the property is retrieved. Every subsequent access to the property on the same element returns the same ID.

Note  The unique ID generated is not guaranteed to be the same every time the document is loaded.

See also

Introduction to DHTML Behaviors
Using HTML Components to Implement DHTML Behaviors in Script



Community Additions

© 2015 Microsoft