关于连接字串 与 Replace
for(i=0; i <records.length; i++){
map[i] = " <span style=\ "color:#color#;\ "> #value# </span> "
if(records[i] == 条件1){
map[i].replace( "#color# ", "#f00 ");
}else{
map[i].replace( "#color# ", "#000 ");
}
map[i].replace( "#value# ",values[i]);
}
请问下,如果把replace写成连接字串,哪一个快些?
------解决方案--------------------差不了多少,写成连接字串好点