JSFiddle - React, Tailwind, and code Playground

by thefourtheye

HTML

<body style="background-color:yellow">
    <input type="button" onclick="changeColor()" value="Change Color" />
</body>
<script>
    function changeColor() {
        document.body.style.backgroundColor = document.body.style.backgroundColor.replace("yellow", "blue");
    }
</script>