📅  最后修改于: 2022-03-11 15:01:45.236000             🧑  作者: Mango
# running on https://www.example.com?name=n1&name=n2
let params = new URLSearchParams(location.search);
params.get('name') # => "n1"
params.getAll('name') # => ["n1", "n2"]