摘要:
1. 格式化 formatfunction format(string) { var args = arguments; var pattern = new RegExp(“%([1-" + arguments.length + "])”, ”g”); return String(string).replace(pattern, function(match, index) { return args[index]; }); };//调用 format(“And the %1 want to know whose %2 you %3″, ”papers”, ... 阅读全文