📌  相关文章
📜  获取 url 查询参数 js - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:14.480000             🧑  作者: Mango

代码示例6
// Get query string from url
const href = 'http://localhost:8080/sign-up?ref=devjohndoe'
const referral_token = new URL(href).search.split('?ref=').pop();
console.log(referral_token);