设url为https://yungot.com?action=xxoo&page=1&limit=10
求:去掉url中的page参数,使其变为:https://yungot.com?action=xxoo&limit=10
解决方案:调用removeUrlParam函数
解:removeUrlParam(‘page’)
// url处理
function getRequestParams() {
const requestParams = {
};
const url
本文介绍了如何使用JavaScript从URL中删除指定参数,例如将'https://yungot.com?action=xxoo&page=1&limit=10'变为'https://yungot.com?action=xxoo&limit=10',通过调用removeUrlParam('page')实现。
订阅专栏 解锁全文

4125

被折叠的 条评论
为什么被折叠?



