The following would do but only will replace one occurence:
"string".replace('/', 'ForwardSlash');
For a global replacement, or if you prefer regular expressions, you just have to escape the slash:
"string".replace(///g, 'ForwardSlash');
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…