console.log(new URLSearchParams());
这个URLSearchParams对象的append方法调用没有成功。
let paramsString = "?post=1234&action=edit";
let urlParams = new URLSearchParams(paramsString);
console.log(new URLSearchParams());
console.log(urlParams.has("post")); // true
console.log(urlParams.get("action")); // "edit"
console.log(urlParams.getAll("action")); // ["edit"]
console.log(urlParams.toString()); // "?post=1234&action=edit"
// 不知为何这个方法调用无效
console.log(urlParams.append("active", "1")); // "?post=1234&action=edit&active=1