js小记

it2022-05-08  10

通过 referrer获取当前url的来源url,获取主来源     例如  www.baidu.com   var tmpURL = document.referrer; if(tmpURL){   tmpURL = tmpURL.substr(0, str.lastIndexOf('/'));   tmpURL = tmpURL.substr(0, str.lastIndexOf('/')); }     工作需要,A系统与B系统做接口,B系统通过这个referrer获取,接口数据来源url,很是方便。

转载于:https://www.cnblogs.com/orange16/p/6037882.html

相关资源:垃圾分类数据集及代码

最新回复(0)