First letter to be capitalize Jquery
This question already has an answer here:
干得好:
data[0] = data[0].toUpperCase();
使用Javascript Prototype ..
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
}
var test = "hello";
console.log(test.capitalize())
链接地址: http://www.djcxy.com/p/17874.html
下一篇: 首字母大写Jquery