字符串函数 replace() 方法妙用
alert('10 12 14 16'.replace(/d+/g,function(match){
return parseInt(match,10) > 10 ? '*' : match;
}));
这样就可以筛选出有条件的数据了
成长就是不断否定自己
alert('10 12 14 16'.replace(/d+/g,function(match){
return parseInt(match,10) > 10 ? '*' : match;
}));
这样就可以筛选出有条件的数据了