Javascript examples for String:toLowerCase
The toLowerCase() method converts a string to lowercase letters.
The toLowerCase() method does not change the original string.
None.
A String, representing the value of a string converted to lowercase
The following code shows how to Convert the string to lowercase letters:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//from w ww .ja v a2s. c o m var str = "Hello World!"; var res = str.toLowerCase(); document.getElementById("demo").innerHTML = res; } </script> </body> </html>