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();

Number of User Comments : 1




Well Useful

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

HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us
©2000-2015 All rights reserved worldwide Privacy Policy Disclaimer