Converting to Lower Case and Upper Case in JavaScript
by Amrit HallanWednesday, 26th October 2005
To convert a string to lower case in JavaScript we use the following steps:
var sometext=”This is some text.”;
var casechanged=sometext.toLowerCase();
Now the variable casechanged contains “this is some text.”. For upper case in JavaScript:
var sometext=”This is some text.”;
var casechanged=sometext.toUpperCase();
Now the variable casechanged contains “THIS IS SOME TEXT.”.
Amrit Hallan is a freelance web developer. You can checkout his website at http://www.bytesworth.com. For more such articles join BYTESWORTH REACHOUT at http://www.bytesworth.com/br/default.asp or if you have a web dev related question then post it at http://www.business180.com/index.php