日期:2014-05-16 浏览次数:20353 次
???? <script language="javascript">
???????????? var strM =
"javascript is a good script language";
???????????
?//在此将字母a全部替换成字母A
???????????? alert(strM.replace(/a/g,"A"));
?????????? //下面是不分大小写都替换
?????????? alert(s.replace(/a|A/g,"B"));
?????
</script>
?
?
来源:
http://blog.163.com/wengqichy@yeah/blog/static/94464926200892781530138/