Change Filed lower text to Upper Text

Change Filed lower text to Upper Text

How i can use the  below script to Change Filed lower text to Upper Text in the a filed!
--------------------------------------
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
  var str = "Hello World!";
  var res = str.toUpperCase();
  document.getElementById("demo").innerHTML = res;
}
</script>
--------------------------------------


                  New to ADSelfService Plus?