定义和用法

toLowerCase() 方法用于把字符串转换为小写。

语法

stringObject.toLowerCase()

返回值

一个新的字符串,在其中 stringObject 的所有大写字符全部被转换为了小写字符。

实例

在本例中,"Hello world!" 将以小写字母来显示:

<script type="text/javascript">

var str="Hello World!"
document.write(str.toLowerCase())

</script>


 

相关文章:

  • 2022-12-23
  • 2021-09-07
  • 2021-12-24
  • 2021-09-01
  • 2022-02-07
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-17
  • 2022-12-23
  • 2022-03-10
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案