Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates an IHTMLDOMAttribute interface with a specified IHTMLDOMAttribute2::name.
![]() |
Syntax
HRESULT retVal = object.createAttribute(bstrattrName, ppattribute);
Parameters
bstrattrName [in]
Type: BSTRA BSTR that sets the IHTMLDOMAttribute2::name property.
ppattribute [out, retval]
Type: IHTMLDOMAttributeA pointer variable that receives an IHTMLDOMAttribute2 pointer.
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.
IHTMLDocument7::createAttribute was introduced in Microsoft Internet Explorer 6.