Home >Web Front-end >JS Tutorial >How to convert uppercase to lowercase in js?

How to convert uppercase to lowercase in js?

烟雨青岚
烟雨青岚Original
2020-06-13 13:52:123994browse

How to convert uppercase to lowercase in js?

#How to convert uppercase to lowercase in js?

js letter case conversion method:

1. Convert to uppercase: toUpperCase()

2. Convert to Lowercase: toLowerCase()

3. Example:

Example 1:

var a="aBcD";
a=a.toUpperCase();
alert(a);

The prompt is ABCD

Example 2:

var a="aBcD";
a=a.toLowerCase();
alert(a);

The prompt is abcd

Recommended tutorial: "JS Tutorial"

The above is the detailed content of How to convert uppercase to lowercase in js?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn