JSFiddle - React, Tailwind, and code Playground

HTML

<input type = "button" value = "Paint Me" onclick ="paintIt()">

JavaScript

function paintIt()
{ 
    color = prompt("Enter the color you want on the Background???"); 
var body = document.getElementsByTagName('body')[0];
body.style.backgroundColor = color;
}