HTML DOM Document createAttribute()
HTML DOM Document createAttribute() Method
The createAttribute() method is used for creating an attribute and it will return it in the form of an Attr object.
Syntax:-
Its syntax is:- document.createAttribute(name)
Return:-
Its return is:- created attribute node
Further Explanation:-
Parameter | Description |
name | Required. The name of the attribute to create. |