三星宋江打什么印:请教Javascript Replace函数

来源:百度文库 编辑:中科新闻网 时间:2024/04/28 01:23:53
str=“asdasdasdasd”
我想把 str裏的 全部 a替换成 b 怎麽写呢?
是全部的 a

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

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