Edit This Code:
<!DOCTYPE html>
<html>
<body>

<form>
  First Name: <input type="text" id="fname" value="Donald">
  Convert to upper case
  <input type="radio" onclick="if(this.checked){myFunction()}">
</form>

<script>
function myFunction() {
  document.getElementById("fname").value = document.getElementById("fname").value.toUpperCase();
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy