how to change attributes using java script code example
Example 1: javascript set attribute href
var a = document.getElementById('myElementID');
a.href = "http://www.mywebsite.com";
Example 2: javascript setattribute
element.setAttribute(<name>, <value>);
// ex
var aElement = document.querySelector("a");
aElement.setAttribute("href", "https://isitchristmas.com/");
// same as <a href="https://isitchristmas.com/"></a>