JSFiddle - React, Tailwind, and code Playground

by Amar Nyayapati

HTML

<input type="checkbox" id="chk" onclick="func()">
<script>
    var b=document.getElementById("chk");
    if(b.checked == true){
        alert("hey");
    }    
    </script>