var a="hello world ! 你好,世界!hello world!";
a.replace(/你好,世界/g,'我是誰'); //"hello world ! 我是誰!hello world!"
a.replace(/hello/g,'你好'); //"你好 world ! 你好,世界!你好 world!"
其中替換特殊字符需要轉義:
var a="hello world ! 你好,世界!hello world!";
a.replace(/你好,世界/g,'我是誰'); //"hello world ! 我是誰!hello world!"
a.replace(/hello/g,'你好'); //"你好 world ! 你好,世界!你好 world!"
其中替換特殊字符需要轉義:
(function(d, s, id) { let js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) retur