<html>
<body>
<h1>HTML DOM Events</h1>
<h2>The focusout Event</h2>
Enter your name: <input type="text" id="fname" onfocusout="myFunction()">
<p>When you leave the input field, a function transforms the input text to upper case.</p>
<script>
function myFunction() {
let x = document.getElementById("fname");
x.value = x.value.toUpperCase();
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onfocusout by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:39:59 GMT -->
</html>