📜  使用 js 获取 url 参数 - Javascript 代码示例

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

代码示例2
const queryString = window.location.search;

const urlParams = new URLSearchParams(queryString);

const page_type = urlParams.get('page_type')

console.log(page_type);