JSFiddle - React, Tailwind, and code Playground

HTML

<body>
    <input type ="checkbox" id = "checkbox1.0">
    <input type ="checkbox" id = "checkbox2.0" onclick="check()">
   </body>

JavaScript

function check(){
       var id = "checkbox1\\.0";
       if($('#' + id).is(':checked')){alert("checked");} 
   }