我正在使用http://www.asual.com/jquery/address/
我在这里看到过如何将哈希切换为另一个值,我已经完成了
$.address.state('s');
这被调用一次,并且工作正常。
然后我为每个页面更改添加ID
$.address.value( id );
第一次工作正常。我遇到的麻烦是每次更改页面时都会添加s get,即
如何获得example.com/s/2的任何想法?
答案 0 :(得分:0)
这样做了
$.address.state('/');
// switching off auto update in order to avoid adding value to the browser history
$.address.autoUpdate(false);
$.address.value(document.location.pathname+document.location.search);
$.address.autoUpdate(true);