日期:2014-05-16  浏览次数:20345 次

想在分號後加字母怎麼不行?
ds= "ab;c{d} ";
ds.replace(/;[\n]*/g, ';n ');
document.write(ds+ " <br> ");

------解决方案--------------------
没赋值
<script language=javascript>
ds= "ab;c{d} ";
ds=ds.replace(/;[\n]*/g, ';n ');
document.write(ds+ " <br> ");
</script>