change background color on button click in javascript

Solutions on MaxInterview for change background color on button click in javascript by the best coders in the world

showing results for - "change background color on button click in javascript"
Marta
23 Oct 2017
1
2<style>
3  .bg1 {
4  	background-color: red;
5  }
6</style>
7
8<button id="btnChangebgColor" />
9
10<script>
11  	$(document).ready(function(){
12      $("#btnChangebgColor").click(function() {
13        $(this).addClass(".bg1");
14      }); 
15	}
16</script>
queries leading to this page
button background color on clickhow to change button background color within button action in javascriptbackground color button javascriptbutton click background color change csshow to change the color of back ground on java script on click formjavascript set background color on clickhow to change background color of button in javascriptdom javascript onclick change background colorbutton onclick background color csshow to make a button change color when clicked in javascriptchange background color when button is clicked jschange the background of button when color on click in andjs button background colorhow to change the background color with javascript with a buttonchange background color on click using domjavascript change background color onclick projecthow to change background color on click in javascriptonclick change background color css javascriptjavascript change button background colorclick button to change background color htmlchange background color on button click in javascript keep text samebutton click button background color change jsjavascript onclick change background color of divchange button background color of button on clickonclick change color of button csschange the color whenn click button using javascriptchange form background color on button click change button text and background color with a click eventchange background color based on button click in javascriptchange color of button on click csshow to set background color of button in javascriptcolor button when clicked javascripthow to change the button color on clickon button click change background coloronclick background color change in javascript w3schoolshow to change clicked button background color cssjavascript button click event change background colorhow to add background color on clicked button csshow to change color of the button when it is clicked in jsonclick change background button colora javascript code to change a background color using buttons change button background color after clickjavascript onclick change background colorclick button change background htmljavascript change background color on clickjavascript click change background coloradd a background color to a class when a button is clicked using jschange background color in javascript onclickhow to change background color using button in javascriptchange button color after click javascriptchange background color javascript onclickchange the background color of button when clicked buttonbutton to change background color javascriptchange backgroung color in js onclickchange the background color of div onclick using javascriptchange background color of button javascriptchange background color javascript buttonjavascript to change background color on button clickclick on button using javascript and change button background colorhow to change color on button clickchange backgound color in html on clickchange backgroung color on click html css jshow to change the background color based on click buttonchange button color on click javascriptonclick change background color on a paticular buttonchanging background color onclick javascriptjavascript how to change background color on button clickjavascript button click event change background color by class namechange background color javascript on clickhow to change background color on on click in jsbutton click background color changehow to change background color of a button in javascripthow to change button background color in javascripthow to change the background color in on the button clickonclicke change the background color of the buttonjavascript current clicked button change background colorbackground color on click javascriptchange button background color on clickhow to change background color on button click in javascriptchange background color on click jschange button background color on click csshow to change button color add javascriptchanging div background color javascript from button clickonclick button change background color cssonclick set background colorjavascript background color change buttonon click of button chane background color cssadd color to button on click jsadding background color to button onclickjavascript change body background color onclickchange button color onclick javascriptchange background color on button clikchow to change background color in html on clickhow to change background color of button on click using csshow to change the background color in on the btn clickonclick change button background colorhow to change button background color to custom color in javascript how to change background color of button on click in htmlchange button color when clicked javascriptcan you change the background color of a button when you click iithow to change background color of seected button onclick in javascriptonclick event change background color and release button change color change button text and background color with onclick eventchange color of background when clicking buttonhow to change background color of html on clickonclick change background color w3how to change button color on button click in javascriptjs change color when button is clickedjavascript button onclick background color changebutton click background color change code in csschange backgound color in javascript on clickbutton background color javascriptjavascript change background color onclickchange button background color onclick javascriptpressing the button changes the background color of the paragraphs javascriptchange backgroundcolor onclickchange background color on click json onclick background colorchange dom body color buttonjs change button background colorhtml code to change background color when clicking a buttononclick change that element background colorhow to change backgroundcolor with click on buttonbutton on click change color css jsjavascript change button background color onclickjavascript function onclick to make background color changechange button color background after clickchange button background color javascripthow to change background color when click on button in javascriptonclick set pages and buttons should have have background colorjs change background color on clickchange background color on button click in javascript text not changingonclick event change background colorhow to change to color of an amount when click on button in javascriptchange background color on click domchange button color on button click in javascriptchange color when click on buttonchange background color on button click in javascript w3schoolsjavascript change button background color onclick back to origin colorhow to change the background color in on the button click in anugalrjs make button change color on clickjavascript onclick background color changehow to change the color of background based on button clickmake a button change color javascripthow to change color when when click button javascripthow to change background color by button clickwhen i click on a button background color changechange text color when button is click jsclick button change background colorjavascript button change background colorchange background color of button on clickhow to set background color on button click in javascripthow to change background color of button onclick in htmljavascript change background color of buttonhow to change background color on clicking buttonchange background color of button jschange background color using javascript onclickjavascript button set onclick change background colorhow to change background color of webpage in javascript with one buttonchange button background color after click and in new page 22changing button background colors javascript 22onclick change body background colorjavascript function change background color onclickchange background color onclick jsjavascript button change colorjavascript change background color on button clickjavascript change background color of page with buttonjavascript background color change onclickchange div background color javascript onclickchange background color on button click change color on button click javascripthow to change the color of a button when clicked in jsjavascript button click event change background color by clss namehtml javascript on click background colour changechange background color with button javascriptchange background color button javascritchange background color on button click in javascriptchange background color onclick javascriptchange background color when button is clickedjavascript to change background color of buttononclick background color change in htmlhow to change the color of background by click on button javascripthow to change color of button when clicked and then change back after clickchange button color onclick jsusing click function to change background color on clickchange background color on button click in javascript for 500mschange background color on clicking a buttonhtml change background color on clickchange background color on click javascriptset background color button javascriptjs change background color when button clickedchange background color of button in javascriptbutton onclick change background color csscss button background color on clickset button background color javascriptchange background color button javascriptwhen user give color the button color are apply in javascripthow to change clicked button background color in htmlchange background color of div on button click in javascripthow to change background color on click javascripthow to chnage the color of a button when clicked javascripthow to create button onclick color change backgroundjavascript code to change background color using onclickclick a button to change color jschange background color of div onclick with javascriptset button background color jsclick button change background color csshow to change background color of button using jschange background color on button click in javascript