Changing button color programmatically

button, dashboard, javascript, label

Solution

I have finally found a working code - try this:

document.getElementById("button").style.background='#000000';

Problem

Is there a way to change the color of a button, or at least the color of the button label programmatically? I can change the label itself with ``` document.getElementById("button").object.textElement.innerText = "newlabel"; ``` But how to change the color?

Original source