退房: jQuery BBQ
< jQuery BBQ旨在解析来自url的查询(查询字符串或片段),并进一步简化基于片段的历史记录。这是Yarin在整理纯js解决方案之前寻找的jQuery插件。具体来说, deparam.fragment() 功能完成这项工作。看看!(我正在使用的支持网站使用了异步搜索功能,并且由于BBQ使得将整个对象放入片段中变得微不足道,所以我使用它'坚持'我的搜索参数,这为我的用户提供了他们搜索的历史状态,还允许他们为有用的搜索添加书签。最重要的是,当QA发现搜索缺陷时,他们可以直接链接到有问题的结果!)
Looking for a way to parse key pairs out of the hash/fragment of a URL into an object/associative array with JavaScript/JQuery
解决方案Check out: jQuery BBQ
jQuery BBQ is designed for parsing things from the url (query string or fragment), and goes a bit farther to simplify fragment-based history. This is the jQuery plugin Yarin was looking for before he put together a pure js solution. Specifically, the deparam.fragment() function does the job. Have a look!
(The support site I'm working on uses an asynchronous search, and because BBQ makes it trivial to tuck entire objects into the fragment I use it to 'persist' my search parameters. This gives my users history states for their searches, and also allows them to bookmark useful searches. Best of all, when QA finds a search defect they can link straight to the problematic results!)
更多推荐
使用JavaScript解析URL哈希/片段标识符
发布评论