JSFiddle - React, Tailwind, and code Playground

HTML

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">


        <title></title>
    </head>
    <body>
        <script type="text/javascript">
    function   validate(){
        if(document.form1.thebox.checked)
            {
                alert("yes");
            }
            else
                alert("no");
    }

    </script>
        <form name="form1" method="get">
            <input type="checkbox" name="thebox"/>
            <input type="button" value="press me" onclick="validate()"/>

    </body>
</html>