标签:
/***
** 功能: 字符串格式化替换操作
***/
String.prototype.format = function () {
var args = arguments;
return this.replace(/\{(\d+)\}/g,
function (m, i) {
return args[i];
});
}标签:
原文地址:http://www.cnblogs.com/allen-tech/p/4758216.html