Javascript examples for String:toLocaleUpperCase
The toLocaleUpperCase() method converts a string to uppercase letters, according to the host's current locale.
The toLocaleUpperCase() method does not change the original string.
None.
A String, representing the value of a string converted to uppercase according to the host's current locale
The following code shows how to Convert the string to uppercase letters:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from www . j ava 2s .c o m*/ var str = "Hello World!"; var res = str.toLocaleUpperCase(); document.getElementById("demo").innerHTML = res; } </script> </body> </html>