Changing button color programmatically

后端 未结 7 1807
一整个雨季
一整个雨季 2020-12-16 10:13

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.getE         


        
7条回答
  •  余生分开走
    2020-12-16 10:50

    Here is an example using HTML:

    
    

    And here is an example using JavaScript:

    document.getElementById("button").bgcolor="#Insert Color Here";
    

提交回复
热议问题