JSFiddle - React, Tailwind, and code Playground

by Aditya Sharma

HTML

<style rel="stylesheet">
		.A { background-color: #ffff00 }
	</style>
	<script>
		function clicked() {
			console.log("color", document.getElementById("A1").style);
			console.log("color", window.getComputedStyle( document.getElementById("A1") , null).getPropertyValue('background-color'));
		}
	</script>
</head>
<body>
	<input type="button" id="A1" class="A" value="1" onclick="clicked()">