JSFiddle - React, Tailwind, and code Playground

by shahrukh007

HTML

<input type="text" id="id">
<button type="button" onclick="myfunc(event)">
click me
</button>
<script>function myfunc() {
var x=$("#id").val();
  if (isNaN(x)) {
    alert("number");
  }
  alert("not number");
}</script>