Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ver = ver.replace(/http://www.google.com/g,'http://www.google.ro');
似乎是/上的冲突
如何解决这个问题?
感谢帮助!
/用反斜杠转义斜杠\,因为前者用于分隔正则表达式:
/
\
ver = ver.replace(/http:\/\/www.google.com/g,'http://www.google.ro');
使用反斜杠转义正斜杠: