<input id="textLog" name="txt" type="text" onblur="login();">

    <span id="result"> </span>
        body{
            display: flex;
            height: 100vh;
            align-items: center;
            justify-content: center;
        }
        input {
            display: block;
            color: #e53f3f;
            border: 2px solid #262626;
            border-radius: 20px;
            padding: 5px;
            padding-left: 10px;
            outline: none;
            font-family: Verdana;
            font-weight: bold;
            box-shadow: 0px 10px 20px #262626;
            margin: 10px;
        }
        #result{
            color: red;
            font-weight: bold;
            font-family: Verdana;
        }
  function login() {
            var obj = document.getElementById('result');
            var txt = document.getElementById('textLog');

            if (isNaN(txt.value))
                obj.innerHTML = "You entered text!";
            else
                obj.innerHTML = "You entered number!";
        }
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.