Retrieves the element's unique identifier.
Syntax
HRESULT get_uniqueID( BSTR *p );
Parameters
- p
- Address of a string (BSTR) used to return the object's unique identifier.
Return Value
Returns S_OK if successful, or an error code otherwise.
Remarks
When applied to the document object, this property causes the browser to automatically generate a new identifier that can then be assigned to an element's ID property.
When applied to an element, 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 that the unique identifier generated is not guaranteed to be the same every time the page is loaded.
See Also