javascript 中有一個 url 對象,通過它可以非常方便的獲取 url 中的參數。
const getparambyurl = (key) =>{
const url = new url(location.href)。
return url.searchparams.get(key)。
}
const getparambyurl = (key) =>{
const url = new url(location.href)。
return url.searchparams.get(key)。
}