Hi,

For converting a string to upper case in javascript, use the following code.


<html>
<head>
<title>Convert String</title>
<script type="text/javascript" language="javascript">
<!-- //
onload = function(){
    var str = new String("coderzheaven");
    var toUpperCase = str.toUpperCase();
    document.write(toUpperCase);
}
// -->
</script>
</head>
<body>

</body>
</html>

It will give you ‘CODERZHEAVEN’

🙂

 

One Comment

  1. BindraBindu September 21, 2011 at 6:16 pm

    Hi Guys,
    toUpperCase() method is used to convert string in upper case letter……. for more details please check out the following link….

    http://mindstick.com/Articles/ee5376d3-8b21-41a4-90b4-192f41f0ba6a/?Implementing%20String%20Object%20in%20Java%20Script

    Thanks !!!

     

Leave a Reply

Your email address will not be published. Required fields are marked *

 

 

 

Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.