test

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JavaScript Event</title>

    <style>
        p{
            font-size: 25px;
            color: #1a004e;
        }
        span.text {
            font-size: 20px;
            color: #1a004e;
        }
    </style>
</head>
<body>
    <div class="cont">
    <p>Modify the text in the input field, then click outside the field to fire the onchange event.</p>

    <span class="text"> Enter some text:</span> <input type="text" name="txt" value="Hello" onchange="myFunction(this.value)">
    </div>

    <script>
        function myFunction(val){
            alert("The input value has changed. The new value is: " + val);
        }
    </script>
</body>
</html>