怎么只转换首字母
不知道怎么用级联,就自己用正则表达式写了
参考如下代码:
var a = "this";var b = a[0].toUpperCase() + a.slice(1);//b: This