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

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

代码示例3
// Example URL: https://example.com/over/there?name=ferret
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const parameter_name = urlParams.get('name')
console.log(parameter_name);