JSFiddle - React, Tailwind, and code Playground
by jmichae3
HTML
<body>
<form method="post">
<input id="i" type="button" value="click me" onclick="doit()">
</form>
<script>
function doit() {
var el=document.getElementById('i');
if ("#33CCFF"!=el.style.backgroundColor) {
el.style.backgroundColor="#33CCFF";
} else {
el.style.backgroundColor="#FFCC33";
}
}
</script>
</body>