JavaScript program to change background color of a webpage provided by user

Write a function that prompts the user for a color and uses what they select to set the background color of webpage .

Source Code

    <title>Change background color on prompt</title>
        function setBgColor() {
            var color = prompt("Enter the color", "white");
   = color;
            document.getElementById("panel").innerHTML = "Your given color: " + color;

<body onload="setBgColor()">
    <p id="panel"></p>