1 // Selecting the element
2 var btn = document.getElementById("myBtn");
3
4 // Setting new attributes
5 btn.setAttribute("class", "click-btn");
6 btn.setAttribute("disabled", "");
1// Here's what you do for the style attribute
2span.setAttribute("style", "width:110%;float:center;left-margin:-10px;top-margin:-10;");