更改URL参数

更改URL参数,第1张

更改URL参数

在学到很多东西之后的四年后,回答我自己的问题。特别是您不应该将jQuery用于所有功能。我创建了一个可以解析/字符串查询字符串的简单模块。这使得修改查询字符串变得容易。

您可以按以下方式使用查询字符串:

// parse the query string into an objectvar q = queryString.parse(location.search);// set the `row` propertyq.rows = 10;// convert the object to a query string// and overwrite the existing query stringlocation.search = queryString.stringify(q);


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5509177.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-13
下一篇 2022-12-13

发表评论

登录后才能评论

评论列表(0条)

保存