How to convert text of an HTML input text box to uppercase during typing with JavaScript

1 Answer

0 votes
<!DOCTYPE html>
<html>

<head>  
</head>
  
<body>

<input type="text" id="input-text-id" onkeyup="KeyUp()">

<script>        

function KeyUp() 
{
  it_id = document.getElementById("input-text-id");
  it_id.value = it_id.value.toUpperCase();
}

/*
run:

every char typed in "input-text-id" will be converted to uppercase
  
*/

</script>

</body>
</html>

 



answered Aug 24, 2015 by avibootz

Related questions

...