JSFiddle - React, Tailwind, and code Playground

HTML

<input value="press" type="button" onclick="myclick()">

<script>
  //alert("home");
</script>

JavaScript

$(document).ready(function() {

   //alert("ready is executed");
   
   function myclick(){
      alert("myclick called")
      //window.location.reload(true);
   }
   
   alert(myclick);
   document.getElementsByTagName("input")[0].onclick = myclick;
})