createAttribute method

Creates an IHTMLDOMAttribute interface with a specified IHTMLDOMAttribute2::name.

 

Syntax

HRESULT retVal = object.createAttribute(bstrattrName, ppattribute);

Parameters

Exceptions

Exception Condition
InvalidCharacterError 5

If the specified name contains an illegal character. Versions earlier than Internet Explorer 10 will throw the exception as INVALID_CHARACTER_ERR.

 

Standards information

Remarks

This method will fail if the bstrattrName parameter value contains invalid (non-Unicode Transformation Format (UTF)-16) characters.

IHTMLDocument5::createAttribute was introduced in Microsoft Internet Explorer 6.