Answers for "changing button background"

CSS
1

change background color on button click in javascript

<style>
  .bg1 {
  	background-color: red;
  }
</style>

<button id="btnChangebgColor" />

<script>
  	$(document).ready(function(){
      $("#btnChangebgColor").click(function() {
        $(this).addClass(".bg1");
      }); 
	}
</script>
Posted by: Guest on March-17-2021
1

html change button color

.button {
	background-color: #A62773; /*Color Code*/
}
Posted by: Guest on May-22-2021

Code answers related to "changing button background"

Browse Popular Code Answers by Language