如何使用jQuery查询字符串对象插件-设置,清空,删除方法不起作用 [英] How to use jquery query string object plugin - set, empty, remove methods not working

查看:84
本文介绍了如何使用jQuery查询字符串对象插件-设置,清空,删除方法不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此插件: http://plugins.jquery.com/project/query-object

I am using this plugin: http://plugins.jquery.com/project/query-object

'get'和'toString'方法工作正常,但是'set','empty'和'remove'方法无效.在作者的演示中,他仅使用"get"和"toString",但在页面顶部的示例中,他使用了其余的"nice-to-have"方法.

The 'get' and 'toString' methods work fine, but the 'set', 'empty', and 'remove' methods do not work. In the author's demonstration, he only uses 'get' and 'toString', but in his example on the top of the page, he uses the rest of the "nice-to-have" methods.

有人遇到过吗?

谢谢.

推荐答案

我尝试了set方法,并且效果很好:

I tried the set method, and it works just fine:

alert($.query.set("section", 5).set("action", "do").toString());

输出:

?section=5&action=do

这篇关于如何使用jQuery查询字符串对象插件-设置,清空,删除方法不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆