I have the following dynamic variables:
var fontsize = "12px"
var left= "200px"
var top= "100px"
The variables may differ, it may be also others like color, line-height... I know that I can set them to my element like this:
document.getElementById("myElement").style.top=top
document.getElementById("myElement").style.left=left
...but is it possible to set them all together, something like:
document.getElementById("myElement").style = allMyStyle
Thank you.