首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

js中施用正则表达式实现replaceAll方法

2012-09-08 
js中使用正则表达式实现replaceAll方法http://www.360doc.com/content/11/0407/20/2956608_108008354.shtm

js中使用正则表达式实现replaceAll方法

http://www.360doc.com/content/11/0407/20/2956608_108008354.shtml

<html><head><title></title><script language="javascript">function replaceAll(){var oldValue = "abcdea";var newValue = oldValue.replace(new RegExp("\a","gm"),"x");alert("oldValue="+oldValue+"\n"+"newValue="+newValue);}replaceAll();</script></head><body></body></html>
?

热点排行