close
var s = s.replace(/\被替換的字串/g,"新字串");
例如:
var s = "AAA,BBB,CCC";
s = s.replace(/\,/g,"<br>");
輸出:
AAA<br>BBB<br>CCC
全站熱搜
var s = s.replace(/\被替換的字串/g,"新字串");
例如:
var s = "AAA,BBB,CCC";
s = s.replace(/\,/g,"<br>");
輸出:
AAA<br>BBB<br>CCC
留言列表