js替换域名绝对地址

直接上方法了

'https://old.xhcss.com/xh/dedecms/mark/'.replace(/^https?:\/\/[^/]+/, ""); // => /xh/dedecms/mark/
'https://old.xhcss.com/xh/dedecms/mark/'.replace(/^https?:\/\/[^/]+\//, "");// => xh/dedecms/mark/'


相关内容

发表评论

验证码:
点击我更换图片

最新评论