JS Tutor

Welcome to the JavaScript Background color Examples Page

Changing Background Colors


This page demonstrates changing background colors using the JavaScript document.bgcolor in a user-defined functioned called ChangeNow(). The function is called by input buttons which pass the color to the function. When the user clicks the button with color name, the background color changes to that color. Try it.