Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

toUpperCase Method (JavaScript)

Returns a string where all alphabetic characters have been converted 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 strVariable = "This is a STRING.";
strVariable = strVariable.toUpperCase( );

The value of strVariable after the last statement is:

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. See Version Information.

Applies To: String Object (JavaScript)

Show:
© 2015 Microsoft