setAttributeNS() in javascript

setAttributeNS() method in javascript

It is used to add or update the attribute in an element using name or namespace.

Example

Try Yourself