×

Index

JavaScript Tutorial

JavaScript Examples

CSS Tutorial

CSS Examples

JavaScript - Display Input Text into Lowercase

In this code snippet we will learn how to convert input text into lowercase using JavaScript function.

Convert Input Text into Lowercase Characters

JavaScript function:

<script type="text/javascript">
   function convertCase(text){
   	var strLCase= text.toLowerCase();
   	document.getElementById("dispText").innerHTML = strLCase;
   }
</script>

JavaScript and HTML Code to Display Input Text into Lowercase

<!--JavaScript-Display Input Text into Lowercase Characters.-->
<html>
   <head>
      <title>JavaScript-Display Input Text into Lowercase Characters.</title>
      <script type="text/javascript">
         function convertCase(text){
         	var strLCase= text.toLowerCase();
         	document.getElementById("dispText").innerHTML = strLCase;
         }
      </script>
   </head>
   <body style="text-align: center">
      <h1>JavaScript-Display Input Text into Lowercase Characters.</h1>
      <input type="text" id="inputText"/><br><br>
      <input type="button" value="Display in Lowercase" onClick='convertCase(inputText.value)'/>
      <!--Lowercase text will display here-->
      <div id="dispText" style="text-size: 200%"></div>
   </body>
</html>

Result:

display input text in lowercase javascript

JavaScript Examples »



Related Examples



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.