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

How to convert uppercase to lowercase in js?

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

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!

JS
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