首页  >  问答  >  正文

javascript - file://\http:192.168.1.14:9001/Static.....png

file://http:192.168.1.14:9001/Static.....png
file:// 用正则或者其他方法去掉

阿神阿神2748 天前2583

全部回复(1)我来回复

  • 大家讲道理

    大家讲道理2017-04-11 12:16:44

    你要去掉什么, 去掉之前的和去掉之后的, 你都列出来.

    var str = 'file://http:192.168.1.14:9001/Static.....pngfile:';
    str = str.replace(/\/\//, '');
    console.log(str);

    回复
    0
  • 取消回复