替换字符串中的字符 - replace()替换字符串中的字符 - replace()<html><body> <script type="text/javascript"> var str="Visit Microsoft!"document.write(str.replace(/Microsoft/,"yousite")) </script></body></html>