<html> <body> <button onclick="var myS = new String('Sample String'); alert(myS.toLocaleUpperCase());"> to Locale Upper Case </button> </body> </html>