JavaScript
Article
By Sam Deering

jQuery toUpperCase/toLowerCase Example

By Sam Deering

JavaScript code snippet to convert text to UpperCase and to LowerCase. Simple Example provided for your amusements – shows case changes for form value form inputs.

See: The jQuery titleCaps Function

--ADVERTISEMENT--

jQuery('form').submit(function() {
    jQuery('input#value').val(function(i, val) {
          return val.toUpperCase();
           return val.toLowerCase();
    });
 });
Login or Create Account to Comment
Login Create Account
Recommended
Sponsors
Get the most important and interesting stories in tech. Straight to your inbox, daily.