[javaScript] Convert text case to lowercase

To convert a string (text) to lowercase one can make use of javaScript toLowercase() function.

Let's see an example:

<title>Convert text to lower case!</title>


<input type="text"  style="width:300px;padding:6px" id="text" 
placeholder="Enter text to convert to lower case"/> 
  <input type="button" value="Convert" onClick="convertToLovercase();"/> 
<input type="text"  style="width:300px;padding:6px" id="result" 

<script type="text/javascript">

function convertToLovercase() {

	var data = document.getElementById("text").value;

	var lowerCase = data.toLowerCase();

	document.getElementById("result").value = lowerCase;