setAttributeNode() in javascript

setAttributeNode() method in javascript

setAttributeNode() method is used to set an attribute for an element.

When specifying it only the attribute can be given.

Example

Try Yourself