Die toLowerCase() Methode gibt den Wert des aufrufenden Strings in Kleinbuchstaben umgewandelt zurück.
Syntax
str.toLowerCase()
Beschreibung
Die toLowerCase() Methode gibt den Wert des Strings in Kleinbuchstaben umgewandelt zurück. toLowerCase() hat keine Auswirkungen auf den Wert des Strings str.
Beispiele
Benutzung von toLowerCase()
console.log('ALPHABET'.toLowerCase()); // 'alphabet'
Spezifikationen
| Spezifikation | Status | Bemerkung |
|---|---|---|
| ECMAScript 1st Edition (ECMA-262) | Standard | Erstmalige Definition. Implementiert in JavaScript 1.0. |
| ECMAScript 5.1 (ECMA-262) Die Definition von 'String.prototype.toLowerCase' in dieser Spezifikation. |
Standard | |
| ECMAScript 2015 (6th Edition, ECMA-262) Die Definition von 'String.prototype.toLowerCase' in dieser Spezifikation. |
Standard |
Browserkompatibilität
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | (Ja) | (Ja) | (Ja) | (Ja) | (Ja) |
| Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | (Ja) | (Ja) | (Ja) | (Ja) | (Ja) | (Ja) |