javascript replace函数
摘要:第一次发现JavaScript中replace() 方法如果直接用str.replace("-","!") 只会替换第一个匹配的字符. 而str.replace(/\-/g,"!")则可以替换掉全部匹配的字符(g为全局标志)。
阅读全文
posted @ 2006-04-30 16:47
posted @ 2006-04-30 16:47
posted @ 2006-04-25 16:47
posted @ 2006-04-25 16:36
posted @ 2006-04-25 16:30
posted @ 2006-04-25 12:29