var str = 'hello world';
alert(str.toUpperCase());//将字符串转换为大写。
alert(str.toLowerCase());//将字符串转换为小写。
alert(str.toLocaleUpperCase());//也是将字符串转换为大写的一种方式
不同的是toLocaleUpperCase()//按照本地方式来转换为大写。
alert(str.toLocaleLowerCase());//按照本地方式来转换为小写。
“toLocaleUpperCase 返回一个字符串,其中所有的字母字符都被转换为大写,同时适应宿主环境的当前区域设置 
toLocaleLowerCase 返回一个字符串,其中所有的字母字符都被转换为小写,同时考虑到宿主环境的当前区域设置 ”








文字转载自http://blog.csdn.net/tiemufeng1122/article/details/8210352



相关文章:

  • 2021-12-05
  • 2021-11-20
  • 2021-05-25
  • 2022-12-23
猜你喜欢
  • 2021-09-24
  • 2022-02-04
  • 2021-06-18
  • 2021-12-23
  • 2021-11-27
  • 2021-06-05
  • 2021-08-29
相关资源
相似解决方案