方法名 标签 currentURL 浏览器,初级 返回当前的 URL。 使用 Window.location.href 获取当前的 URL。 const currentURL = () => window.location.href; currentURL(); // 'https://www.google.com/'