Blog Archive

Javascript convert string to LowerCase and UpperCase example

string.toLowerCase() method converts a string to uppercase letters.
<script type="text/javascript">
     var str="CONVERT THIS TEXT TO LOWERCASE";
     alert(str.toLowerCase());
</script>
string.toUpperCase() method converts a string to uppercase letters.
<script type="text/javascript">
     var str="Convert this text to uppercase";
     alert(str.toUpperCase());
</script>