字符串替换
字符串替换
<script>
var str=('Paul,Paula,paul,Ppaul,Paul');
var new_str=str.replace(/(Paul)/g,"ringo");//Paul替换为ringo
document.write(new_str);
</script>
<script>
var str=('Paul,Paula,paul,Ppaul,Paul');
var new_str=str.replace(/(Paul)/g,"ringo");//Paul替换为ringo
document.write(new_str);
</script>