This topic has not yet been rated - Rate this topic

toUpperCase Method (String) (JavaScript)

JavaScript - Internet Explorer 10

Converts all the alphabetic characters in a string to uppercase.

strVariable.toUpperCase()
"String Literal".toUpperCase() 

The toUpperCase method has no effect on non-alphabetic characters.

The following example demonstrates the effects of the toUpperCase method:

var str1 = "This is a STRING.";
var str2 = str1.toUpperCase();
document.write(str2);

// Output: THIS IS A STRING.

Supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards. Also supported in Windows Store apps. See Version Information.

Applies To: String Object (JavaScript)

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.