JavaScript – Change Body Background Color to Different Colors on Button Click
In this JavaScript tutorial we will create a button that will change the background color of body to different colors on a button click.
Create a Button
Let's first create a button which will call a JavaScript function changeBg() on click.