JavaScript字符串对象toUpperCase方法入门实例(用于把字母转换为大写)_基础知识

WBOY
Release: 2016-05-16 16:33:34
Original
1451 people have browsed it

JavaScript toUpperCase方法

toUpperCase方法用于把(英文)字符串转换为大写,并返回转换后的字符串。其语法如下:

复制代码代码如下:

str_object.toUpperCase()

toUpperCase方法实例

复制代码代码如下:


运行该例子,输出:

复制代码代码如下:

AABBCC

toLocaleUpperCase方法

toLocaleUpperCase方法 toUpperCase基本一样,toLocaleUpperCase按照本地方式把字符串转换为大写。只有几种语言(如土耳其语)具有地方特有的大小写映射。

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
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!