function Acapital(str) {
return str.trim().toLowerCase().replace(str[0], str[0].toUpperCase());
}
console.log(Acapital('aIAAx'));
js 首字母转换成大写
最新推荐文章于 2023-06-08 16:08:24 发布
function Acapital(str) {
return str.trim().toLowerCase().replace(str[0], str[0].toUpperCase());
}
console.log(Acapital('aIAAx'));