第202天 如何使用js获取当前的url和来源的url?
window.location.href
window.location.href
document.referrer
https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer
document.referrer;
// "https://github.com/haizlin/fe-interview/labels/js"
window.location.href;
// "https://github.com/haizlin/fe-interview/issues/1478"
Most helpful comment
window.location.href
document.referrer