var tabletd_gg=document.getElementById('gg_blank').innerHTML;
var count = 0;
var res_gg = tabletd_gg.replace(/~/g, function(x){ var symbol = count++ == 1 ? '~<br/>' : x; return symbol;});
document.getElementById('gg_blank').innerHTML=res_gg;
效果是这样的
转换
为什么用getElementsByClassName()就失效了?
相关分类