何宗的头像 ID: 49618535441

何宗

HelloWorld 社区成员

5387516410

文章3
个人网站0
加入社区2025

js将一段字符串的首字母转成大写

使用slice函数,还有非常多的方法,请打在评论区接龙<pre<code//字符串首字母大写stringToUpCase(str){returnstr.slice(0,1).toUpperCase()str.slice(1,str.length)},

超时调用与间歇调用

一、超时调用setTimeout()setTimeout()方法用于在指定的毫秒数后调用函数或计算表达式。<pre<codesetTimeout(coda/function,milliseconds,param1,param2,...)</code</p