发布于 2年前

ES6 如何获取当前URL?

const currentURL = () => window.location.href

// 事例
currentURL() // 'https://google.com'
©2020 edoou.com   京ICP备16001874号-3