Question: how to change the background color of html document using javascript?
Answer: <title>Change the Background Color with JavaScript</title>
<script>
// Function to change webpage background color.
function changeBodyBg(color){
document. body. style. background = color;
}
// Function to change heading background color.
function changeHeadingBg(color){