Javascript --扩展String实现替换字符串中index处字符

String.prototype.replaceCharAt = function(n,c){
return this.substr(0, n)+ c + this.substr(n+1,this.length-1-n);
}

posted @ 2014-10-16 13:08  lcchuguo  阅读(249)  评论(0编辑  收藏  举报