Export (0) Print
Expand All

createAttribute method

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

Document Object Model (DOM) Level 3 Core Specification, Section 1.4

Syntax


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

Parameters

bstrattrName [in]

Type: BSTR

A BSTR that sets the IHTMLDOMAttribute2::name property.
ppattribute [out, retval]

Type: IHTMLDOMAttribute

A pointer variable that receives an IHTMLDOMAttribute2 pointer.

Exceptions

ExceptionCondition
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.

 

 

Community Additions

ADD
Show:
© 2014 Microsoft