String.prototype.capitalize=函数(){return this.replace(/^./,函数(char){return char.toUpperCase();});};对于所有咖啡迷来说:字符串::大写=->@替换/^./,(字符)->字符到UpperCase()