Lower Case input element value using jQuery

You can convert an input element value into upper case (all letters in small letters) with the help of toLowerCase function. The example of toLowerCase method mentioned below: Code


<html>

  <body>
     <input type='text' value='Good Morning' id='inputElem'>>  
    <script language='JavaScript' type='text/Javascript'>
      var result = $('#inputElem').val().toLowerCase();
    </script>
  </body>
</html>
Output

'result' variable's value would be 'good morning'