📌  相关文章
📜  javascript 读取查询参数 - Javascript 代码示例

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

代码示例4
// example url: https://mydomain.com/?fname=johnny&lname=depp
const urlParams = new URLSearchParams(window.location.search);
const firstName = urlParams.get('fname'); // johnny