JavaScript 字符串 string replace函数 JavaScript 字符串 string match 方法(函数) JavaScript 字符串 string replace 替换函数 JavaScript 字符串 string replace函数 <html> <head> <title>JavaScript String replace() Method</title> </head> <body> <script type = "text/javascript"> var re = /apples/gi; var str = "Apples are round, and apples are juicy."; var newstr = str.replace(re, "oranges"); document.write(newstr ); </script> </body> </html> JavaScript 字符串 string match 方法(函数) JavaScript 字符串 string replace 替换函数