JSFiddle - React, Tailwind, and code Playground

HTML

<html>
<body>
    <input id="edValue" type="text" onKeyPress="edValueKeyPress()"><br>
    <span id="lblValue">The text box contains: </span>
</body>

<script>
    function edValueKeyPress()
    {
        setTimeout( function () {
            var edValue = document.getElementById("edValue");
            var s = edValue.value;
    
            var lblValue = document.getElementById("lblValue");
            lblValue.innerText = "The text box contains: "+s;
        }, 1);
    }
</script>    

</html>