return args[i];
}); }; String.IsDateStrAndNum=function(dateStr){ var regexp=/^\d{4}-\d{2}-\d{2}\s{1}\d{2}:\d{2}:\d{2}$/; var regexp2=/^\d{0,20}$/; return regexp.test(dateStr) || regexp2.test(dateStr); };
/***********************************************************/
row="this is a {0} for String.format {1} in the string can contains {} is also can replace create";
//方法一
var arr = new Array("demo","function");
row=String.format(row,arr);
alert(row);//this is a demo for String.format function in the string can contains {} is also can replace create
//方法二
row=String.format(row,"demo","function");
alert(row);//this is a demo for String.format function in the string can contains {} is also can replace create