JSFiddle - React, Tailwind, and code Playground

by vikastyagi87

HTML

<form method="post" action="" id="myForm">
    <input type="text" value="1234" />
    <input type="text" value="1234fd" />
    <input type="text" value="1234as" />
    <input type="text" value="123477" />
    <input type="submit" value="Send" id="submit" />
</form>

JavaScript

$(function() {

        $("#submit").click(function() {

            $("#myForm input[type=text]").each(function() {

                if(!isNaN(this.value)) {
                    alert(this.value + " is a valid number");
                }

            });
            return false;
        });

    });