snippet

Use addAttribute on Javascript for add attribute

myElement.setAttribute("attribute", "value");
Related snippets