views:

109

answers:

4

Is there any String manipulation function in Javascript or JQuery for object lowercasing / uppercasing?

I need to lowercase a string object.

+1  A: 

Assuming you mean changing case not cast...

<script type="text/javascript">

var str="Hello World!";
document.write(str.toLowerCase());

</script> 
JoshBerke
+2  A: 

See toLowerCase().

RedFilter
+1  A: 

"abc".toUpperCase() will give you "ABC", and toLowerCase() works similarly.

eliah
+1  A: 

using jQuery:

 //Lowercase
 $('input#email').val($(this).val().toLowerCase());

 //Uppercase
 $('input#email').val($(this).val().toUpperCase());
Upper Stage