js append styles object code example
Example: set multiple attributes css javascript
document.getElementById("myElement").style.cssText = "display: block; position: absolute";
document.getElementById("myElement").style.cssText = "display: block; position: absolute";