方法一:
var url = "https://www.baidu.com/abc/xyz";
url = '/' + url.split('/').slice(3).join('/');
方法二:
var url = "https://www.baidu.com/abc/xyz";
url = url.replace(/^https:\/\/[^/]+/, "");
方法一:
var url = "https://www.baidu.com/abc/xyz";
url = '/' + url.split('/').slice(3).join('/');
方法二:
var url = "https://www.baidu.com/abc/xyz";
url = url.replace(/^https:\/\/[^/]+/, "");