const urlSP = new URLSearchParams(location.search); function getQueryString(key){ return urlSP.get(key) }// 或着 const urlObj = new URL(location.href); function getQueryString(key){ return urlObj.searchParams.get(key) }
作者:孟繁贵 Email:meng010387@126.com 期待共同进步!