toUpperCase() : Converting Lower case text to Uppercase in JavaScript

var str="Welcome to plus2net";
var a1 = str.toUpperCase();
document.write(a1); // WELCOME TO PLUS2NET
Full code is Here
<html>
<head>
<title></title>
</head>
<body>

<script type="text/javascript">
var str="Welcome to plus2net";
var a1 = str.toUpperCase();
document.write(a1);//WELCOME TO PLUS2NET
</script>

</body>
</html>

Demo

Enter text in Lower case
<script language=JavaScript>
<!--
function copy()
{
document.getElementById("t1").value=document.getElementById("t1").value.toUpperCase();
}
//-->
</script>
Enter text in Lower case <BR>
<input  type=text id=t1 name=text onKeyUp=copy();> 
Tutorial on onKeyUp() event handling

Here is the basic syntax for toUpperCase method.

var a1 = string.toUpperCase();

JavaScript String Reference Uppercase to lower case by toLowerCase() method
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com







    Prakash

    11-03-2010

    Well Useful

    Post your comments , suggestion , error , requirements etc here




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2023 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer