龙珠是什么:请教Javascript Replace函数

来源:百度文库 编辑:高校问答 时间:2024/05/03 07:46:43
str=“asdasdasdasd”
我想把 str裏的 全部 a替换成 b 怎麽写呢?
是全部的 a

<script>
str="asdasdasdasd"
str = str.replace(/\a/g, "b");
alert(str)
</script>

str1=Replace(str,"a","b")