标签:
//TODO 字符串格式值
String.prototype.formatValue = function(){
var args = arguments;
return this.replace(/{(\d+)}/g,function( item,index ){
return args[index];
});
};
(function( window ){
var Utils = {
//TODO 判断当前参数的类型
type : function( param ){
return param == null ? String( null ) : Object.prototype.toString.call( param ).toLowerCase().split(" ")[1].replace("]","") || "object";
}
};
window.Utils = Utils;
})( window );
标签:
原文地址:http://www.cnblogs.com/Ming2020/p/4944027.html