JSFiddle - React, Tailwind, and code Playground

HTML

<button id='button' onmouseover="change();" style='width:50px; height:50px; margin-left:auto;'>click</button>

JavaScript

function color(){
	var color = "#"
	for(var i = 0; i<6; i++){
		color += Math.floor((Math.random()*16)).toString(16);
	};
	document.getElementsByTagName('body')[0].style.backgroundColor = color;
}

function change(){
	setInterval(color, 1000);
}