Converting Lower case text to Uppercase in JavaScript

We can convert lowercase letter to upper case letter by using toUpperCase() method in JavaScript. This you must have seen in some sites were after entering your user id and when we come out of input box, it changes to uppercase. Here this function toUpperCase() is used along with a event handler. Here is the basic syntax for toUpperCase method.

var a1 = str.toUpperCase();



Here str is our string variable. The new string ( with uppercase letters ) is stored in new variable a1.

Here is the sample code

var str="This is my 1st new tutorial 123";
var a1 = str.toUpperCase();
document.write(a1);



Converting Uppercase letter to lower case using toLowerCase() method

Number of User Comments : 1


Google+

Prakash

11-03-2010

Well Useful

Post Comment This is for short comments only. Use the forum for more discussions.






OPINION POLL

How you handle Search Engine Optimization ( SEO ) for your website
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us
©2000-2015 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer