<script>
document.getElementById("fname").addEventListener("change", myFunction);
function myFunction() {
var x = document.getElementById("fname");
x.value = x.value.toUpperCase();
}
</script>
<element onchange="myFunction()">
<!--Runs JS function when html element is changed. Example:-->
<select onchange="console.log("Changed")">
<!-- Outputs "Changed" when select element option is changed! -->