Home > Web Front-end > JS Tutorial > body text

How to convert letters to uppercase and lowercase in jquery?

青灯夜游
Release: 2020-11-30 15:30:03
Original
6558 people have browsed it

Letter case conversion method: 1. Use toLowerCase() method to convert uppercase letters to lowercase, the syntax is ""uppercase letters".toLowerCase()"; 2. Use toUpperCase() method to convert lowercase letters to Uppercase, syntax ""lowercase letters".toUpperCase()".

How to convert letters to uppercase and lowercase in jquery?

The operating environment of this article: windows10 system, jquery2.2.4, this article is applicable to all brands of computers.

【Related recommendations: jQuery video tutorial

jquery letter case conversion

1. Convert uppercase to lowercase

"ABC".toLowerCase()//转小写
Copy after login

toLowerCase() method is used to convert a string to lowercase.

2. Convert lowercase to uppercase

"abc".toUpperCase()//转大写
Copy after login

toUpperCase() method is used to convert a string to uppercase.

Use case:

When the input box loses focus, convert the content to uppercase

Copy after login

For more programming-related knowledge, please visit:ProgrammingIntroduction! !

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!