DekGenius.com
Team LiB   Previous Section   Next Section
Document.createAttribute( ) create a new Attr node

Availability

DOM Level 1 Core

Synopsis

Attr createAttribute(String name) 
    throws DOMException;

Arguments

name

The name for the newly created attribute.

Returns

A newly created Attr node with its nodeName property set to name.

Throws

This method throws a DOMException with a code of INVALID_CHARACTER_ERR if name contains an illegal character.

See Also

Attr, Element.setAttribute( ), Element.setAttributeNode( )

    Team LiB   Previous Section   Next Section