JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="numberInput" value="0777">
<input type="button" id="numberCheck" value="Check">

JavaScript

$(document).ready(function() {
    $('#numberCheck').click(function() {
        alert("ff");
        if(str.val()).charAt(0) == '0')
            alert("Неправильно набран номер");
    });
});